am 4e3404d9: am dec3f138: Merge "Force-use the pbuffer surface for destroy" into lmp-mr1-dev
* commit '4e3404d90fe33a0ff790aff4a97b6bb55e4c0e8f':
Force-use the pbuffer surface for destroy
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 118e124..80d46ae 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -60,6 +60,8 @@
void CanvasContext::destroy() {
stopDrawing();
+ setSurface(NULL);
+ mEglManager.usePBufferSurface();
freePrefetechedLayers();
destroyHardwareResources();
mAnimationContext->destroy();
@@ -67,7 +69,6 @@
delete mCanvas;
mCanvas = 0;
}
- setSurface(NULL);
}
void CanvasContext::setSurface(ANativeWindow* window) {