rework screenshot API and implementation
- SurfaceFlinger now supports to take a screenshot
directly into an IGraphicBufferProducer
- reimplement the IMemoryHeap screenshot on top
of the above
- reimplement LayerScreenshot such that its
BufferQueue is directly used as the destination
of the screenshot. LayerScreenshot is now a thin
wrapper around Layer
Bug: 6940974
Change-Id: I69a2096b44b91acbb99eba16f83a9c78d94e0d10
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index a82767b..5fd7e59 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -109,6 +109,10 @@
virtual void dumpStats(String8& result, char* buffer, size_t SIZE) const;
virtual void clearStats();
+ sp<SurfaceFlingerConsumer> getConsumer() const {
+ return mSurfaceFlingerConsumer;
+ }
+
private:
// Creates an instance of ISurface for this Layer.
virtual sp<ISurface> createSurface();