CE: Use distinct source and destination clip rectangles
The existing logic used a single clip rectangle, which was passed to RenderEngine as both DisplaySettings.physicalDisplay and DisplaySettings.clip. In at least the GLES backend, the first is used to set the GL viewport, and the later is used to set the clip rectangle. However if an Output is set up to render an arbitrary subrectangle of a larger physical display space, distinct values need to be used -- typically the viewport (destination clip) is set to (0, 0, w, h), while the source clip is set to some (x0, y0, x0 + w, y0 + w). Note that in particular we still need to both rectangles to the same (0, y0, w, y0 + h) rectangle when the goal is to hide a notch on a physical device, so the rectangle settings must be obtained from code outside of libcompositionengine. Test: go/wm-smoke on crosshatch, checking notch-hiding Test: atest libcompositionengine_test Test: CtsColorModeTestCases Test: CtsDisplayTestCases Test: CtsGraphicsTestCases Test: CtsUiRenderingTestCases Test: CtsViewTestCases Test: android.media.cts.EncodeVirtualDisplayWithCompositionTest Bug: 144116549 Change-Id: Ic7218da2457f2645af180a1b4eed3dd6896db7d1
Loading
Please register or sign in to comment