am 0d4ab958: am 4e3404d9: am dec3f138: Merge "Force-use the pbuffer surface for destroy" into lmp-mr1-dev
* commit '0d4ab958c11801f5453e999f930416c87c63d100':
Force-use the pbuffer surface for destroy
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index ee629c0..25b13c1 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) {