summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/RenderThread.h
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2017-06-01 13:07:39 -0400
committerStan Iliev <stani@google.com>2017-06-06 14:19:37 -0400
commitf9e45d1d818ae0956ba77ed598b7040cfecca553 (patch)
treead24203eaa17f2dedd3bab03d5536e746aa668b7 /libs/hwui/renderthread/RenderThread.h
parentf74752293d1d25633aebc42c600717d0296a0820 (diff)
Implement CacheManager for the Skia pipelines.
The core of the implementation is complete and provides heuristic cache sizing based on the size of the surface being used. This CL will also be used to add the following features in the future... 1) Support Vulkan pipeline reporting on the size of the surface. 2) Complete the VectorDrawableAtlas stub code 3) Automatic purging of stale resources for low memory devices. Test: hwui_unit_tests (new test added) and CtsUiRendering Bug: 62260637 Change-Id: Ib85159cca28b646fe249f2190b07f1b7e0f50d8f
Diffstat (limited to 'libs/hwui/renderthread/RenderThread.h')
-rw-r--r--libs/hwui/renderthread/RenderThread.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/hwui/renderthread/RenderThread.h b/libs/hwui/renderthread/RenderThread.h
index 4b5601c5abc4..d9842572d7cd 100644
--- a/libs/hwui/renderthread/RenderThread.h
+++ b/libs/hwui/renderthread/RenderThread.h
@@ -20,6 +20,7 @@
#include "RenderTask.h"
#include "../JankTracker.h"
+#include "CacheManager.h"
#include "TimeLord.h"
#include <GrContext.h>
@@ -102,11 +103,13 @@ public:
const DisplayInfo& mainDisplayInfo() { return mDisplayInfo; }
GrContext* getGrContext() const { return mGrContext.get(); }
- void setGrContext(GrContext* cxt) { mGrContext.reset(cxt); }
+ void setGrContext(GrContext* cxt);
+ CacheManager& cacheManager() { return *mCacheManager; }
VulkanManager& vulkanManager() { return *mVkManager; }
sk_sp<Bitmap> allocateHardwareBitmap(SkBitmap& skBitmap);
+ void dumpGraphicsMemory(int fd);
protected:
virtual bool threadLoop() override;
@@ -161,6 +164,7 @@ private:
Readback* mReadback = nullptr;
sk_sp<GrContext> mGrContext;
+ CacheManager* mCacheManager;
VulkanManager* mVkManager;
};