Loading native/android/surface_control.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -411,7 +411,15 @@ void ASurfaceTransaction_setDamageRegion(ASurfaceTransaction* aSurfaceTransactio Region region; for (uint32_t i = 0; i < count; ++i) { region.merge(static_cast<const Rect&>(rects[i])); region.orSelf(static_cast<const Rect&>(rects[i])); } // Hardware composer interprets a DamageRegion with a single Rect of {0,0,0,0} to be an // undamaged region and {0,0,-1,-1} to be a fully damaged buffer. This is a confusing // distinction for a public api. Instead, default both cases to be a fully damaged buffer. if (count == 1 && region.getBounds().isEmpty()) { transaction->setSurfaceDamageRegion(surfaceControl, Region::INVALID_REGION); return; } transaction->setSurfaceDamageRegion(surfaceControl, region); Loading Loading
native/android/surface_control.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -411,7 +411,15 @@ void ASurfaceTransaction_setDamageRegion(ASurfaceTransaction* aSurfaceTransactio Region region; for (uint32_t i = 0; i < count; ++i) { region.merge(static_cast<const Rect&>(rects[i])); region.orSelf(static_cast<const Rect&>(rects[i])); } // Hardware composer interprets a DamageRegion with a single Rect of {0,0,0,0} to be an // undamaged region and {0,0,-1,-1} to be a fully damaged buffer. This is a confusing // distinction for a public api. Instead, default both cases to be a fully damaged buffer. if (count == 1 && region.getBounds().isEmpty()) { transaction->setSurfaceDamageRegion(surfaceControl, Region::INVALID_REGION); return; } transaction->setSurfaceDamageRegion(surfaceControl, region); Loading