diff options
| author | 2013-03-01 13:42:57 -0800 | |
|---|---|---|
| committer | 2013-03-01 22:53:39 -0800 | |
| commit | 2a9fc493dfdba67108e4335bb1fe931bc1e2a025 (patch) | |
| tree | 552d2161fb4e8ea2254e1a07210b6e52fa67367f /services/surfaceflinger/SurfaceFlinger.h | |
| parent | eb0d12963d271052c24abb025d698504df9e7573 (diff) | |
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
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.h')
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h index e67f3f1873..d1221dc8ac 100644 --- a/services/surfaceflinger/SurfaceFlinger.h +++ b/services/surfaceflinger/SurfaceFlinger.h @@ -103,14 +103,6 @@ public: // force full composition on all displays void repaintEverything(); - // renders content on given display to a texture. thread-safe version. - status_t renderScreenToTexture(uint32_t layerStack, GLuint* textureName, - GLfloat* uOut, GLfloat* vOut); - - // renders content on given display to a texture, w/o acquiring main lock - status_t renderScreenToTextureLocked(uint32_t layerStack, GLuint* textureName, - GLfloat* uOut, GLfloat* vOut); - // returns the default Display sp<const DisplayDevice> getDefaultDisplayDevice() const { return getDisplayDevice(mBuiltinDisplays[DisplayDevice::DISPLAY_PRIMARY]); @@ -202,6 +194,10 @@ private: uint32_t* width, uint32_t* height, PixelFormat* format, uint32_t reqWidth, uint32_t reqHeight, uint32_t minLayerZ, uint32_t maxLayerZ); + virtual status_t captureScreen(const sp<IBinder>& display, + const sp<IGraphicBufferProducer>& producer, + uint32_t reqWidth, uint32_t reqHeight, + uint32_t minLayerZ, uint32_t maxLayerZ); // called when screen needs to turn off virtual void blank(const sp<IBinder>& display); // called when screen is turning back on @@ -306,10 +302,18 @@ private: void startBootAnim(); - status_t captureScreenImplLocked(const sp<IBinder>& display, sp<IMemoryHeap>* heap, - uint32_t* width, uint32_t* height, PixelFormat* format, - uint32_t reqWidth, uint32_t reqHeight, uint32_t minLayerZ, - uint32_t maxLayerZ); + status_t captureScreenImplLocked( + const sp<const DisplayDevice>& hw, + sp<IMemoryHeap>* heap, + uint32_t* width, uint32_t* height, PixelFormat* format, + uint32_t reqWidth, uint32_t reqHeight, uint32_t minLayerZ, + uint32_t maxLayerZ); + + status_t captureScreenImplLocked( + const sp<const DisplayDevice>& hw, + const sp<IGraphicBufferProducer>& producer, + uint32_t reqWidth, uint32_t reqHeight, + uint32_t minLayerZ, uint32_t maxLayerZ); /* ------------------------------------------------------------------------ * EGL |