File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -817,6 +817,20 @@ void SurfaceFlinger::handleWorkList()
817817 mHwWorkListDirty = false ;
818818 HWComposer& hwc (graphicPlane (0 ).displayHardware ().getHwComposer ());
819819 if (hwc.initCheck () == NO_ERROR) {
820+
821+ const DisplayHardware& hw (graphicPlane (0 ).displayHardware ());
822+ uint32_t flags = hw.getFlags ();
823+ if ((flags & DisplayHardware::SWAP_RECTANGLE) ||
824+ (flags & DisplayHardware::BUFFER_PRESERVED))
825+ {
826+ // we need to redraw everything (the whole screen)
827+ // NOTE: we could be more subtle here and redraw only
828+ // the area which will end-up in an overlay. But since this
829+ // shouldn't happen often, we invalidate everything.
830+ mDirtyRegion .set (hw.bounds ());
831+ mInvalidRegion = mDirtyRegion ;
832+ }
833+
820834 const Vector< sp<LayerBase> >& currentLayers (mVisibleLayersSortedByZ );
821835 const size_t count = currentLayers.size ();
822836 hwc.createWorkList (count);
You can’t perform that action at this time.
0 commit comments