libsurfaceflinger: handle WINDOW_TYPE_DONT_SCREENSHOT
When a layer has type WINDOW_TYPE_DONT_SCREENSHOT, hide it from
everywhere but the primary display. This should be reverted when we
switch to use layer hierarchy properly.
Bug: 63311708
Test: screencap, screenrecord, android.view.cts.SurfaceViewSyncTest
Change-Id: I6a8d6b93399b0dc42832588f9a6c5e8879a8b754
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 48bbd13..acfad46 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -494,7 +494,7 @@
// mark a region of a layer stack dirty. this updates the dirty
// region of all screens presenting this layer stack.
- void invalidateLayerStack(uint32_t layerStack, const Region& dirty);
+ void invalidateLayerStack(const sp<const Layer>& layer, const Region& dirty);
#ifndef USE_HWC2
int32_t allocateHwcDisplayId(DisplayDevice::DisplayType type);
@@ -510,7 +510,7 @@
* Compositing
*/
void invalidateHwcGeometry();
- void computeVisibleRegions(uint32_t layerStack,
+ void computeVisibleRegions(const sp<const DisplayDevice>& displayDevice,
Region& dirtyRegion, Region& opaqueRegion);
void preComposition(nsecs_t refreshStartTime);