SF: User buffer size instead of layer size when calculating size
- Change the remaining references to layer size with buffer size
- Fail SurfaceFlinger::createLayer if the caller provides a buffer size and the layer is a color or
container layer
- Update Transation_test to explicitly set crop for buffer-less layers
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: Ic40a2ea3e629ce774891075afaf9a4d05e95ca4d
diff --git a/libs/gui/tests/EndToEndNativeInputTest.cpp b/libs/gui/tests/EndToEndNativeInputTest.cpp
index 2871302..86e9c23 100644
--- a/libs/gui/tests/EndToEndNativeInputTest.cpp
+++ b/libs/gui/tests/EndToEndNativeInputTest.cpp
@@ -59,9 +59,8 @@
class InputSurface {
public:
InputSurface(const sp<SurfaceComposerClient>& scc, int width, int height) {
- mSurfaceControl = scc->createSurface(String8("Test Surface"),
- width, height, PIXEL_FORMAT_RGBA_8888,
- ISurfaceComposerClient::eFXSurfaceColor);
+ mSurfaceControl = scc->createSurface(String8("Test Surface"), 0, 0, PIXEL_FORMAT_RGBA_8888,
+ ISurfaceComposerClient::eFXSurfaceColor);
InputChannel::openInputChannelPair("testchannels", mServerChannel, mClientChannel);
mServerChannel->setToken(new BBinder());