SF: Remove setFinalCrop impl 2/2
setFinalCrop functionality is reimplemented by creating a new bounds layer
and applying a crop on this layer. see ag/4625718
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 && \
adb shell /data/nativetest64/sffakehwc_test/sffakehwc_test && \
echo "ALL TESTS PASSED"
Change-Id: I9be511c07a3351a2947afb2beed10ce2a462b635
diff --git a/services/surfaceflinger/layerproto/LayerProtoParser.cpp b/services/surfaceflinger/layerproto/LayerProtoParser.cpp
index e1c0fd3..a5bf9c1 100644
--- a/services/surfaceflinger/layerproto/LayerProtoParser.cpp
+++ b/services/surfaceflinger/layerproto/LayerProtoParser.cpp
@@ -101,7 +101,6 @@
layerProto.requested_position().y()};
layer->size = {layerProto.size().w(), layerProto.size().h()};
layer->crop = generateRect(layerProto.crop());
- layer->finalCrop = generateRect(layerProto.final_crop());
layer->isOpaque = layerProto.is_opaque();
layer->invalidate = layerProto.invalidate();
layer->dataspace = layerProto.dataspace();
@@ -299,8 +298,7 @@
z, static_cast<double>(position.x), static_cast<double>(position.y), size.x,
size.y);
- StringAppendF(&result, "crop=%s, finalCrop=%s, ", crop.to_string().c_str(),
- finalCrop.to_string().c_str());
+ StringAppendF(&result, "crop=%s, ", crop.to_string().c_str());
StringAppendF(&result, "isOpaque=%1d, invalidate=%1d, ", isOpaque, invalidate);
StringAppendF(&result, "dataspace=%s, ", dataspace.c_str());
StringAppendF(&result, "defaultPixelFormat=%s, ", pixelFormat.c_str());
diff --git a/services/surfaceflinger/layerproto/include/layerproto/LayerProtoParser.h b/services/surfaceflinger/layerproto/include/layerproto/LayerProtoParser.h
index 360e599..b1610cf 100644
--- a/services/surfaceflinger/layerproto/include/layerproto/LayerProtoParser.h
+++ b/services/surfaceflinger/layerproto/include/layerproto/LayerProtoParser.h
@@ -92,7 +92,6 @@
float2 requestedPosition;
int2 size;
LayerProtoParser::Rect crop;
- LayerProtoParser::Rect finalCrop;
bool isOpaque;
bool invalidate;
std::string dataspace;
diff --git a/services/surfaceflinger/layerproto/layers.proto b/services/surfaceflinger/layerproto/layers.proto
index 7f882da..2a09634 100644
--- a/services/surfaceflinger/layerproto/layers.proto
+++ b/services/surfaceflinger/layerproto/layers.proto
@@ -41,7 +41,7 @@
// The layer's crop in it's own bounds.
optional RectProto crop = 14;
// The layer's crop in it's parent's bounds.
- optional RectProto final_crop = 15;
+ optional RectProto final_crop = 15 [deprecated=true];
optional bool is_opaque = 16;
optional bool invalidate = 17;
optional string dataspace = 18;