diff options
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 142892e874..03a9df762b 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -2338,16 +2338,19 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags) } } } - if (disp == NULL) { - // NOTE: TEMPORARY FIX ONLY. Real fix should cause layers to - // redraw after transform hint changes. See bug 8508397. - - // could be null when this layer is using a layerStack - // that is not visible on any display. Also can occur at - // screen off/on times. - disp = getDefaultDisplayDeviceLocked(); + + if (transactionFlags & eDisplayTransactionNeeded) { + if (disp == NULL) { + // NOTE: TEMPORARY FIX ONLY. Real fix should cause layers to + // redraw after transform hint changes. See bug 8508397. + + // could be null when this layer is using a layerStack + // that is not visible on any display. Also can occur at + // screen off/on times. + disp = getDefaultDisplayDeviceLocked(); + } + layer->updateTransformHint(disp); } - layer->updateTransformHint(disp); first = false; }); @@ -4613,4 +4616,4 @@ void SurfaceFlinger::traverseLayersInDisplay(const sp<const DisplayDevice>& hw, #if defined(__gl2_h_) #error "don't include gl2/gl2.h in this file" -#endif
\ No newline at end of file +#endif |