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.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index b6b3428..160fbea 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -556,6 +556,13 @@ bool CanvasContext::copyLayerInto(DeferredLayerUpdater* layer, SkBitmap* bitmap)
return LayerRenderer::copyLayer(layer->backingLayer(), bitmap);
}
+void CanvasContext::flushCaches(Caches::FlushMode flushMode) {
+ if (mGlobalContext->hasContext()) {
+ requireGlContext();
+ Caches::getInstance().flush(flushMode);
+ }
+}
+
void CanvasContext::runWithGlContext(RenderTask* task) {
requireGlContext();
task->run();