Rename crop_legacy to just crop
crop_legacy and crop should do the same thing so there's no need for two
separate requests.
Test: go/wm-smoke
Test: SurfaceFlinger_test
Bug: 170765639
Change-Id: I74a740d06d15f7cde9775557e65ad1e3a508bd61
diff --git a/services/surfaceflinger/tests/ScreenCapture_test.cpp b/services/surfaceflinger/tests/ScreenCapture_test.cpp
index 4598f9d..b0753c8 100644
--- a/services/surfaceflinger/tests/ScreenCapture_test.cpp
+++ b/services/surfaceflinger/tests/ScreenCapture_test.cpp
@@ -328,7 +328,7 @@
TEST_F(ScreenCaptureTest, CaptureBoundedLayerWithoutSourceCrop) {
sp<SurfaceControl> child = createColorLayer("Child layer", Color::RED, mFGSurfaceControl.get());
Rect layerCrop(0, 0, 10, 10);
- SurfaceComposerClient::Transaction().setCrop_legacy(child, layerCrop).show(child).apply(true);
+ SurfaceComposerClient::Transaction().setCrop(child, layerCrop).show(child).apply(true);
LayerCaptureArgs captureArgs;
captureArgs.layerHandle = child->getHandle();
@@ -623,7 +623,7 @@
.setLayerStack(layer, 0)
.setLayer(layer, INT32_MAX)
.setColor(layer, {layerColor.r / 255, layerColor.g / 255, layerColor.b / 255})
- .setCrop_legacy(layer, bounds)
+ .setCrop(layer, bounds)
.apply();
DisplayCaptureArgs captureArgs;
@@ -671,8 +671,8 @@
.setLayer(layer, INT32_MAX)
.setColor(layer, {layerColor.r / 255, layerColor.g / 255, layerColor.b / 255})
.setColor(childLayer, {childColor.r / 255, childColor.g / 255, childColor.b / 255})
- .setCrop_legacy(layer, bounds)
- .setCrop_legacy(childLayer, childBounds)
+ .setCrop(layer, bounds)
+ .setCrop(childLayer, childBounds)
.apply();
DisplayCaptureArgs captureArgs;
@@ -853,9 +853,7 @@
}
TEST_F(ScreenCaptureChildOnlyTest, CaptureLayerIgnoresParentCrop) {
- SurfaceComposerClient::Transaction()
- .setCrop_legacy(mFGSurfaceControl, Rect(0, 0, 1, 1))
- .apply(true);
+ SurfaceComposerClient::Transaction().setCrop(mFGSurfaceControl, Rect(0, 0, 1, 1)).apply(true);
// Even though the parent is cropped out we should still capture the child.