diff options
| author | 2013-03-05 02:30:13 +0000 | |
|---|---|---|
| committer | 2013-03-05 02:30:13 +0000 | |
| commit | 306f18c5fb15ac05db09ece7241af02b9713a23d (patch) | |
| tree | 25ad5112b9963cd7f6f822690ad1c7f8afef9ef6 /libs/gui/SurfaceComposerClient.cpp | |
| parent | eabe3140f11e515639e7a70a1286dd6af7352c9e (diff) | |
| parent | 2a9fc493dfdba67108e4335bb1fe931bc1e2a025 (diff) | |
Merge "rework screenshot API and implementation" into jb-mr2-dev
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
| -rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index e8e208f12b..edfa78a35f 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -606,6 +606,17 @@ void SurfaceComposerClient::unblankDisplay(const sp<IBinder>& token) { // ---------------------------------------------------------------------------- +status_t ScreenshotClient::capture( + const sp<IBinder>& display, + const sp<IGraphicBufferProducer>& producer, + uint32_t reqWidth, uint32_t reqHeight, + uint32_t minLayerZ, uint32_t maxLayerZ) { + sp<ISurfaceComposer> s(ComposerService::getComposerService()); + if (s == NULL) return NO_INIT; + return s->captureScreen(display, producer, + reqWidth, reqHeight, minLayerZ, maxLayerZ); +} + ScreenshotClient::ScreenshotClient() : mWidth(0), mHeight(0), mFormat(PIXEL_FORMAT_NONE) { } |