summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/CacheManager.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2019-04-05 16:57:46 -0700
committerJohn Reck <jreck@google.com>2019-04-12 13:33:25 -0700
commit0fa0cbcade324654e4235d0c91f602ffd9dfcafa (patch)
tree441627788e14da1b5359f1f899d8df10e44fb99d /libs/hwui/renderthread/CacheManager.cpp
parenta39c85fc2b563e628a4fd197b4a8b0d0ba86ec43 (diff)
Support render-ahead in vulkan
Bug: 127822449 Test: verified render_ahead working with skiavk Change-Id: Iae1b227a763f6def035057f38cca4b0ab65c7e82
Diffstat (limited to 'libs/hwui/renderthread/CacheManager.cpp')
-rw-r--r--libs/hwui/renderthread/CacheManager.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/libs/hwui/renderthread/CacheManager.cpp b/libs/hwui/renderthread/CacheManager.cpp
index 8b02c11911ca..a31081c9a451 100644
--- a/libs/hwui/renderthread/CacheManager.cpp
+++ b/libs/hwui/renderthread/CacheManager.cpp
@@ -21,17 +21,16 @@
#include "RenderThread.h"
#include "pipeline/skia/ShaderCache.h"
#include "pipeline/skia/SkiaMemoryTracer.h"
-#include "Properties.h"
#include "renderstate/RenderState.h"
#include "thread/CommonPool.h"
#include <GrContextOptions.h>
#include <SkExecutor.h>
#include <SkGraphics.h>
+#include <SkMathPriv.h>
#include <gui/Surface.h>
#include <math.h>
#include <set>
-#include <SkMathPriv.h>
namespace android {
namespace uirenderer {
@@ -79,14 +78,13 @@ void CacheManager::updateContextCacheSizes() {
class CommonPoolExecutor : public SkExecutor {
public:
- virtual void add(std::function<void(void)> func) override {
- CommonPool::post(std::move(func));
- }
+ virtual void add(std::function<void(void)> func) override { CommonPool::post(std::move(func)); }
};
static CommonPoolExecutor sDefaultExecutor;
-void CacheManager::configureContext(GrContextOptions* contextOptions, const void* identity, ssize_t size) {
+void CacheManager::configureContext(GrContextOptions* contextOptions, const void* identity,
+ ssize_t size) {
contextOptions->fAllowPathMaskCaching = true;
// This sets the maximum size for a single texture atlas in the GPU font cache. If necessary,
@@ -180,7 +178,8 @@ void CacheManager::dumpMemoryUsage(String8& log, const RenderState* renderState)
}
const char* layerType = Properties::getRenderPipelineType() == RenderPipelineType::SkiaGL
- ? "GlLayer" : "VkLayer";
+ ? "GlLayer"
+ : "VkLayer";
size_t layerMemoryTotal = 0;
for (std::set<Layer*>::iterator it = renderState->mActiveLayers.begin();
it != renderState->mActiveLayers.end(); it++) {