Enable multi-threading of cpu intensive tasks when using Skia pipelines
Test: CtsUiRenderingTestCases
Change-Id: Ifa36371f55d3f2d78faf0a23fb283c904ff1af5f
diff --git a/libs/hwui/renderthread/CacheManager.h b/libs/hwui/renderthread/CacheManager.h
index 90362f3..3ba2690 100644
--- a/libs/hwui/renderthread/CacheManager.h
+++ b/libs/hwui/renderthread/CacheManager.h
@@ -22,7 +22,10 @@
#include <ui/DisplayInfo.h>
#include <utils/String8.h>
#include <vector>
+
#include "pipeline/skia/VectorDrawableAtlas.h"
+#include "thread/TaskManager.h"
+#include "thread/TaskProcessor.h"
namespace android {
@@ -54,6 +57,7 @@
size_t getCacheSize() const { return mMaxResourceBytes; }
size_t getBackgroundCacheSize() const { return mBackgroundResourceBytes; }
+ TaskManager* getTaskManager() { return &mTaskManager; }
private:
friend class RenderThread;
@@ -77,6 +81,10 @@
};
sp<skiapipeline::VectorDrawableAtlas> mVectorDrawableAtlas;
+
+ class SkiaTaskProcessor;
+ sp<SkiaTaskProcessor> mTaskProcessor;
+ TaskManager mTaskManager;
};
} /* namespace renderthread */