Merge "Prevent calling GL functions with an invalid surface" into lmp-mr1-dev

This commit is contained in:
John Reck
2014-12-01 22:39:29 +00:00
committed by Android (Google) Code Review

View File

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