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
diff --git a/libs/hwui/renderthread/CacheManager.cpp b/libs/hwui/renderthread/CacheManager.cpp
index 55694d0..f6b23e1 100644
--- a/libs/hwui/renderthread/CacheManager.cpp
+++ b/libs/hwui/renderthread/CacheManager.cpp
@@ -44,7 +44,7 @@
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::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() {