summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Robert Carr <racarr@google.com> 2019-01-25 14:29:21 -0800
committer Robert Carr <racarr@google.com> 2019-01-29 13:17:36 -0800
commita35ef9f5ecec00349bfeb69aedbd21f3342ed140 (patch)
tree40f343b3667e0857cc3ab02b6c8c57df4cdd7192
parente1f12b08644bc73066e7e2a406c952a20cff0d0a (diff)
Expose IGBP getter
Useful for comparing a SurfaceControl to an existing Surface, but without calling getSurface which may cause the allocation of an as of yet unexisting Surface wrapper. Bug: 122588130 Test: None Change-Id: I5742bf6af06bd48013a2418b583de8eeeecba2df
-rw-r--r--libs/gui/SurfaceControl.cpp6
-rw-r--r--libs/gui/include/gui/SurfaceControl.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/libs/gui/SurfaceControl.cpp b/libs/gui/SurfaceControl.cpp
index 8e500a4f9b..008f520bb0 100644
--- a/libs/gui/SurfaceControl.cpp
+++ b/libs/gui/SurfaceControl.cpp
@@ -177,6 +177,12 @@ sp<IBinder> SurfaceControl::getHandle() const
return mHandle;
}
+sp<IGraphicBufferProducer> SurfaceControl::getIGraphicBufferProducer() const
+{
+ Mutex::Autolock _l(mLock);
+ return mGraphicBufferProducer;
+}
+
sp<SurfaceComposerClient> SurfaceControl::getClient() const
{
return mClient;
diff --git a/libs/gui/include/gui/SurfaceControl.h b/libs/gui/include/gui/SurfaceControl.h
index 9bba76674d..b584f36e7a 100644
--- a/libs/gui/include/gui/SurfaceControl.h
+++ b/libs/gui/include/gui/SurfaceControl.h
@@ -71,6 +71,8 @@ public:
sp<Surface> createSurface() const;
sp<IBinder> getHandle() const;
+ sp<IGraphicBufferProducer> getIGraphicBufferProducer() const;
+
status_t clearLayerFrameStats() const;
status_t getLayerFrameStats(FrameStats* outStats) const;