summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/RenderProxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/renderthread/RenderProxy.cpp')
-rw-r--r--libs/hwui/renderthread/RenderProxy.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index a1f1717e6b96..eed523810403 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -24,6 +24,7 @@
#include "renderthread/EglManager.h"
#include "renderthread/RenderTask.h"
#include "renderthread/RenderThread.h"
+#include "renderstate/RenderState.h"
#include "utils/Macros.h"
#include "utils/TimeUtils.h"
@@ -693,6 +694,20 @@ int RenderProxy::copyGraphicBufferInto(GraphicBuffer* buffer, SkBitmap* bitmap)
}
}
+CREATE_BRIDGE2(onBitmapDestroyed, RenderThread* thread, uint32_t pixelRefId) {
+ args->thread->renderState().onBitmapDestroyed(args->pixelRefId);
+ return nullptr;
+}
+
+void RenderProxy::onBitmapDestroyed(uint32_t pixelRefId) {
+ if (!RenderThread::hasInstance()) return;
+ SETUP_TASK(onBitmapDestroyed);
+ RenderThread& thread = RenderThread::getInstance();
+ args->thread = &thread;
+ args->pixelRefId = pixelRefId;
+ thread.queue(task);
+}
+
void RenderProxy::post(RenderTask* task) {
mRenderThread.queue(task);
}