diff options
author | Mathias Agopian <mathias@google.com> | 2011-08-25 14:36:43 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2011-08-25 14:36:43 -0700 |
commit | ec49d8970125b3da422f93bf6f6b32ac62230a83 (patch) | |
tree | 41cda6532b3b57ab35f334b21af27c4206ed24ed /services/surfaceflinger | |
parent | 27bf191327cd509daf52e3ebea2385ce66545093 (diff) | |
download | frameworks_base-ec49d8970125b3da422f93bf6f6b32ac62230a83.zip frameworks_base-ec49d8970125b3da422f93bf6f6b32ac62230a83.tar.gz frameworks_base-ec49d8970125b3da422f93bf6f6b32ac62230a83.tar.bz2 |
Fix screenshots
Change-Id: If904634e64b154bbe336d5789dd1209b8ae871fb
Diffstat (limited to 'services/surfaceflinger')
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 6fde361..598220f 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -2211,10 +2211,13 @@ status_t SurfaceFlinger::captureScreenImplLocked(DisplayID dpy, const size_t count = layers.size(); for (size_t i=0 ; i<count ; ++i) { const sp<LayerBase>& layer(layers[i]); - const uint32_t z = layer->drawingState().z; - if (z >= minLayerZ && z <= maxLayerZ) { - if (layer->isProtected()) { - return INVALID_OPERATION; + const uint32_t flags = layer->drawingState().flags; + if (!(flags & ISurfaceComposer::eLayerHidden)) { + const uint32_t z = layer->drawingState().z; + if (z >= minLayerZ && z <= maxLayerZ) { + if (layer->isProtected()) { + return INVALID_OPERATION; + } } } } @@ -2270,9 +2273,12 @@ status_t SurfaceFlinger::captureScreenImplLocked(DisplayID dpy, for (size_t i=0 ; i<count ; ++i) { const sp<LayerBase>& layer(layers[i]); - const uint32_t z = layer->drawingState().z; - if (z >= minLayerZ && z <= maxLayerZ) { - layer->drawForSreenShot(); + const uint32_t flags = layer->drawingState().flags; + if (!(flags & ISurfaceComposer::eLayerHidden)) { + const uint32_t z = layer->drawingState().z; + if (z >= minLayerZ && z <= maxLayerZ) { + layer->drawForSreenShot(); + } } } |