summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/RenderThread.h
diff options
context:
space:
mode:
authorHuihong Luo <huisinro@google.com>2021-01-15 14:27:06 -0800
committerJorim Jaggi <jjaggi@google.com>2021-02-16 17:38:12 +0100
commit5fdf7b8d26f3cd1a2f2fb8a441d40d33270d3b77 (patch)
tree42fb177d3a385875f96f560e5abc6ab35d034d7c /libs/hwui/renderthread/RenderThread.h
parentd8385e060c12acc21010956f4fbe57daa526a41a (diff)
Add SurfaceControl to hwui
add a method, setSurfaceControl, for java layer to pass surface control to the render thread Bug: 173671170 Test: call setSurfaceControl method in ViewRootImpl.java Change-Id: I886a79c377938f19cf38b9058f2bec64e1439000
Diffstat (limited to 'libs/hwui/renderthread/RenderThread.h')
-rw-r--r--libs/hwui/renderthread/RenderThread.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/RenderThread.h b/libs/hwui/renderthread/RenderThread.h
index 4fbb07168ac0..bb7c5181e112 100644
--- a/libs/hwui/renderthread/RenderThread.h
+++ b/libs/hwui/renderthread/RenderThread.h
@@ -78,6 +78,16 @@ struct VsyncSource {
virtual ~VsyncSource() {}
};
+typedef void (*ASC_acquire)(ASurfaceControl* control);
+typedef void (*ASC_release)(ASurfaceControl* control);
+
+struct ASurfaceControlFunctions {
+ ASurfaceControlFunctions();
+
+ ASC_acquire acquireFunc;
+ ASC_release releaseFunc;
+};
+
class ChoreographerSource;
class DummyVsyncSource;
@@ -121,6 +131,10 @@ public:
void preload();
+ const ASurfaceControlFunctions& getASurfaceControlFunctions() {
+ return mASurfaceControlFunctions;
+ }
+
/**
* isCurrent provides a way to query, if the caller is running on
* the render thread.
@@ -189,6 +203,8 @@ private:
sk_sp<GrDirectContext> mGrContext;
CacheManager* mCacheManager;
sp<VulkanManager> mVkManager;
+
+ ASurfaceControlFunctions mASurfaceControlFunctions;
};
} /* namespace renderthread */