SF: Add support for boundless layers 1/2
Size is currently used to bound a layer and its child layers. There are scenarios where we do not want to restrict a layer or its children to any specific size. For example 1. Have a color layer fill the bounds of its parent. 2. Have a layer apply a transform (ROTATION) to all child layers without cropping them. Currently this is achieved by providing a large enough size so that the layer or its children do not get cropped incorrectly. This change modifies computeBounds and computeScreenBounds to ignore a layer's size. We calculate the bounds by using the layer's buffer size and/or crop. Then we pass the bounds to the parent layer to crop to its bounds. If the layer has no bounds, we pass the child bounds forward. If we are also at the bottom of the hierarchy, such as a boundless color layer, then our bounds are set to the parent bounds. In WM, we set the layer's crop property in places where we relied on layer size. Bug: 114413815 Test: go/wm-smoke Test: mmma frameworks/native/services/surfaceflinger/tests/ && \ mmma frameworks/native/libs/gui/tests/ && adb sync data && \ adb shell /data/nativetest64/libgui_test/libgui_test && \ adb shell /data/nativetest64/libsurfaceflinger_unittest/libsurfaceflinger_unittest && \ adb shell /data/nativetest64/SurfaceFlinger_test/SurfaceFlinger_test && \ adb shell /data/nativetest64/SurfaceParcelable_test/SurfaceParcelable_test && \ echo "ALL TESTS PASSED" Change-Id: I962c0c7639f6c863fc16b8acd16f077f040f8de4
Loading
Please register or sign in to comment