blast: default to surface damage to invalid
SurfaceDamage should be invalid unless set. Invalid SurfaceDamage
forces HWC to assume the whole buffer is damaged. Clearing the
damage tells HWC the buffer hasn't changed at all.
Bug: 139311175
Test: Repro steps in https://b.corp.google.com/issues/139311175#comment1
Change-Id: Ifcb84d8a974994c8d5204c34933b4b3390f13af5
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index a2eeea5..7dfc3a7 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -105,7 +105,7 @@
mCurrentState.acquireFence = new Fence(-1);
mCurrentState.dataspace = ui::Dataspace::UNKNOWN;
mCurrentState.hdrMetadata.validTypes = 0;
- mCurrentState.surfaceDamageRegion.clear();
+ mCurrentState.surfaceDamageRegion = Region::INVALID_REGION;
mCurrentState.cornerRadius = 0.0f;
mCurrentState.api = -1;
mCurrentState.hasColorTransform = false;