summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/CanvasContext.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.h')
-rw-r--r--libs/hwui/renderthread/CanvasContext.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h
index 056a70621bef..8ca54af13baa 100644
--- a/libs/hwui/renderthread/CanvasContext.h
+++ b/libs/hwui/renderthread/CanvasContext.h
@@ -186,6 +186,10 @@ public:
IRenderPipeline* getRenderPipeline() { return mRenderPipeline.get(); }
+ void addFrameCompleteListener(std::function<void(int64_t)>&& func) {
+ mFrameCompleteCallbacks.push_back(std::move(func));
+ }
+
private:
CanvasContext(RenderThread& thread, bool translucent, RenderNode* rootRenderNode,
IContextFactory* contextFactory, std::unique_ptr<IRenderPipeline> renderPipeline);
@@ -263,6 +267,8 @@ private:
std::vector<sp<FuncTask>> mFrameFences;
sp<TaskProcessor<bool>> mFrameWorkProcessor;
std::unique_ptr<IRenderPipeline> mRenderPipeline;
+
+ std::vector<std::function<void(int64_t)>> mFrameCompleteCallbacks;
};
} /* namespace renderthread */