am dec3f138: Merge "Force-use the pbuffer surface for destroy" into lmp-mr1-dev

* commit 'dec3f138c2f6a31879b0fe055a26d618e4874bb5':
  Force-use the pbuffer surface for destroy
This commit is contained in:
John Reck
2014-11-25 19:59:05 +00:00
committed by Android Git Automerger

View File

@@ -60,6 +60,8 @@ CanvasContext::~CanvasContext() {
void CanvasContext::destroy() { void CanvasContext::destroy() {
stopDrawing(); stopDrawing();
setSurface(NULL);
mEglManager.usePBufferSurface();
freePrefetechedLayers(); freePrefetechedLayers();
destroyHardwareResources(); destroyHardwareResources();
mAnimationContext->destroy(); mAnimationContext->destroy();
@@ -67,7 +69,6 @@ void CanvasContext::destroy() {
delete mCanvas; delete mCanvas;
mCanvas = 0; mCanvas = 0;
} }
setSurface(NULL);
} }
void CanvasContext::setSurface(ANativeWindow* window) { void CanvasContext::setSurface(ANativeWindow* window) {