diff options
| author | John Reck <jreck@google.com> | 2014-11-25 09:54:13 -0800 |
|---|---|---|
| committer | John Reck <jreck@google.com> | 2014-11-25 09:54:13 -0800 |
| commit | b945f2313aee6e49a082ba5caaf95334d2570d52 (patch) | |
| tree | 99319f925561305925e2dc3ec71c651f2f04b0cd | |
| parent | 0c31d97a38909e85e0df6cdc29469dbb1580ed4b (diff) | |
| download | frameworks_base-b945f2313aee6e49a082ba5caaf95334d2570d52.zip frameworks_base-b945f2313aee6e49a082ba5caaf95334d2570d52.tar.gz frameworks_base-b945f2313aee6e49a082ba5caaf95334d2570d52.tar.bz2 | |
Force-use the pbuffer surface for destroy
Bug: 18518580
If CanvasContext is being destroyed() the Surface
is probably no longer valid as well, so make sure to
makeCurrent() to the pbuffer surface so that the
subsequent GL operations are not using an invalid
EGLSurface
Change-Id: Ica5d6a065841772c47e00ad65aa7894c7e27e043
| -rw-r--r-- | libs/hwui/renderthread/CanvasContext.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp index 39528be..4f39ac9 100644 --- a/libs/hwui/renderthread/CanvasContext.cpp +++ b/libs/hwui/renderthread/CanvasContext.cpp @@ -60,6 +60,8 @@ CanvasContext::~CanvasContext() { void CanvasContext::destroy() { stopDrawing(); + setSurface(NULL); + mEglManager.usePBufferSurface(); freePrefetechedLayers(); destroyHardwareResources(); mAnimationContext->destroy(); @@ -67,7 +69,6 @@ void CanvasContext::destroy() { delete mCanvas; mCanvas = 0; } - setSurface(NULL); } void CanvasContext::setSurface(ANativeWindow* window) { |
