From dd098e8d781e6527730e33f2c638cd1be66eedc8 Mon Sep 17 00:00:00 2001 From: Stan Iliev Date: Wed, 9 Aug 2017 09:42:38 -0400 Subject: [PATCH] Disable VD shared atlas surface Using a shared atlas surface is causing a variance in AA pixels when drawing the same content. This is causing some CTS tests in CtsPreference2TestCases to fail because of up to RGB(1,1,1) difference in AA pixels in screenshots of a recreated activity. Another effect is reducing memory usage ("GL mtrack" down by 10MB for clock app). Test: Ran CtsPreference2TestCases tests. Bug: 64487466 Change-Id: I1e5a547285c885136b6885d129d566d5b0c2ed76 --- libs/hwui/renderthread/CacheManager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/hwui/renderthread/CacheManager.cpp b/libs/hwui/renderthread/CacheManager.cpp index 55694d046c2f6..f6b23e1a07233 100644 --- a/libs/hwui/renderthread/CacheManager.cpp +++ b/libs/hwui/renderthread/CacheManager.cpp @@ -44,7 +44,7 @@ namespace renderthread { CacheManager::CacheManager(const DisplayInfo& display) : mMaxSurfaceArea(display.w * display.h) { mVectorDrawableAtlas = new skiapipeline::VectorDrawableAtlas(mMaxSurfaceArea/2, - skiapipeline::VectorDrawableAtlas::StorageMode::allowSharedSurface); + skiapipeline::VectorDrawableAtlas::StorageMode::disallowSharedSurface); } void CacheManager::reset(GrContext* context) { @@ -62,7 +62,8 @@ void CacheManager::reset(GrContext* context) { void CacheManager::destroy() { // cleanup any caches here as the GrContext is about to go away... mGrContext.reset(nullptr); - mVectorDrawableAtlas = new skiapipeline::VectorDrawableAtlas(mMaxSurfaceArea/2); + mVectorDrawableAtlas = new skiapipeline::VectorDrawableAtlas(mMaxSurfaceArea/2, + skiapipeline::VectorDrawableAtlas::StorageMode::disallowSharedSurface); } void CacheManager::updateContextCacheSizes() {