diff options
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.h')
-rw-r--r-- | libs/hwui/renderthread/CanvasContext.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h index 626e75e74d31..c20f7c7e91a3 100644 --- a/libs/hwui/renderthread/CanvasContext.h +++ b/libs/hwui/renderthread/CanvasContext.h @@ -115,6 +115,8 @@ public: */ GrDirectContext* getGrContext() const { return mRenderThread.getGrContext(); } + ASurfaceControl* getSurfaceControl() const { return mSurfaceControl; } + // Won't take effect until next EGLSurface creation void setSwapBehavior(SwapBehavior swapBehavior); @@ -207,6 +209,15 @@ public: static void onSurfaceStatsAvailable(void* context, ASurfaceControl* control, ASurfaceControlStats* stats); + void setASurfaceTransactionCallback( + const std::function<void(int64_t, int64_t, int64_t)>& callback) { + mASurfaceTransactionCallback = callback; + } + + bool mergeTransaction(ASurfaceTransaction* transaction, ASurfaceControl* control); + + static CanvasContext* getActiveContext(); + private: CanvasContext(RenderThread& thread, bool translucent, RenderNode* rootRenderNode, IContextFactory* contextFactory, std::unique_ptr<IRenderPipeline> renderPipeline); @@ -302,6 +313,8 @@ private: // If set to true, we expect that callbacks into onSurfaceStatsAvailable bool mExpectSurfaceStats = false; + + std::function<void(int64_t, int64_t, int64_t)> mASurfaceTransactionCallback; }; } /* namespace renderthread */ |