Assign default texture id of 0
Some logic depends on a default value of 0, which was not being
assigned.
Issue #7195815 chrome url bar is corrupted
Issue #7190656 Textures corrupted on mr1
Change-Id: I346b7b76e885bf8f04740e711fd88f917a5418c7
diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp
index 799aea3..f2e7f66 100644
--- a/libs/hwui/LayerRenderer.cpp
+++ b/libs/hwui/LayerRenderer.cpp
@@ -299,13 +299,6 @@
LAYER_RENDERER_LOGD("Recycling layer, %dx%d fbo = %d",
layer->getWidth(), layer->getHeight(), layer->getFbo());
- GLuint fbo = layer->getFbo();
- if (fbo) {
- flushLayer(layer);
- Caches::getInstance().fboCache.put(fbo);
- layer->setFbo(0);
- }
-
if (!Caches::getInstance().layerCache.put(layer)) {
LAYER_RENDERER_LOGD(" Destroyed!");
Caches::getInstance().resourceCache.decrementRefcount(layer);
@@ -314,6 +307,7 @@
#if DEBUG_LAYER_RENDERER
Caches::getInstance().layerCache.dump();
#endif
+ layer->removeFbo();
layer->region.clear();
}
}