summaryrefslogtreecommitdiff
path: root/libs/hwui/renderstate/OffscreenBufferPool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/renderstate/OffscreenBufferPool.cpp')
-rw-r--r--libs/hwui/renderstate/OffscreenBufferPool.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/hwui/renderstate/OffscreenBufferPool.cpp b/libs/hwui/renderstate/OffscreenBufferPool.cpp
index 90b27c8d8fb0..ea292d678c67 100644
--- a/libs/hwui/renderstate/OffscreenBufferPool.cpp
+++ b/libs/hwui/renderstate/OffscreenBufferPool.cpp
@@ -17,7 +17,6 @@
#include "OffscreenBufferPool.h"
#include "Caches.h"
-#include "Properties.h"
#include "renderstate/RenderState.h"
#include "utils/FatVector.h"
#include "utils/TraceUtils.h"
@@ -118,7 +117,8 @@ OffscreenBuffer::~OffscreenBuffer() {
///////////////////////////////////////////////////////////////////////////////
OffscreenBufferPool::OffscreenBufferPool()
- : mMaxSize(Properties::layerPoolSize) {
+ // 4 screen-sized RGBA_8888 textures
+ : mMaxSize(DeviceInfo::multiplyByResolution(4 * 4)) {
}
OffscreenBufferPool::~OffscreenBufferPool() {
@@ -179,8 +179,9 @@ OffscreenBuffer* OffscreenBufferPool::resize(OffscreenBuffer* layer,
layer->region.clear();
return layer;
}
+ bool wideColorGamut = layer->wideColorGamut;
putOrDelete(layer);
- return get(renderState, width, height, layer->wideColorGamut);
+ return get(renderState, width, height, wideColorGamut);
}
void OffscreenBufferPool::dump() {