summaryrefslogtreecommitdiffstats
path: root/libs/hwui/renderthread/CanvasContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.cpp')
-rw-r--r--libs/hwui/renderthread/CanvasContext.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 0a17e13..967cb6f 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -51,13 +51,14 @@ CanvasContext::CanvasContext(RenderThread& thread, bool translucent,
}
CanvasContext::~CanvasContext() {
- destroyCanvasAndSurface();
- mRenderThread.removeFrameCallback(this);
+ destroy();
delete mAnimationContext;
- freePrefetechedLayers();
}
-void CanvasContext::destroyCanvasAndSurface() {
+void CanvasContext::destroy() {
+ stopDrawing();
+ freePrefetechedLayers();
+ destroyHardwareResources();
if (mCanvas) {
delete mCanvas;
mCanvas = 0;