diff options
| author | 2018-11-29 14:02:07 -0800 | |
|---|---|---|
| committer | 2018-11-30 01:26:45 +0000 | |
| commit | 3043ca8a3c68facd3bee63a95874fe60340e9b77 (patch) | |
| tree | 96fbc1f5a1e1d7080957d0a7c7cf4fe8831549b3 | |
| parent | ae4c86f078ef50da674d0ab04e6e17e7ebc1f54e (diff) | |
SF: Set crop for color layer in ChildColorLayerTest
When creating a color or container layer, the call will fail if a buffer size is set. Layers
without buffers should set a crop instead.
Test: mmma frameworks/native/services/surfaceflinger/tests/ && \
adb sync data && \
adb shell /data/nativetest64/sffakehwc_test/sffakehwc_test
Change-Id: I76cd85b43614cd0ef1113d127840f751a11cbb12
| -rw-r--r-- | services/surfaceflinger/tests/fakehwc/SFFakeHwc_test.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/surfaceflinger/tests/fakehwc/SFFakeHwc_test.cpp b/services/surfaceflinger/tests/fakehwc/SFFakeHwc_test.cpp index 356a880b6e..16e08918a0 100644 --- a/services/surfaceflinger/tests/fakehwc/SFFakeHwc_test.cpp +++ b/services/surfaceflinger/tests/fakehwc/SFFakeHwc_test.cpp @@ -1214,7 +1214,7 @@ class ChildColorLayerTest : public ChildLayerTest { protected: void SetUp() override { TransactionTest::SetUp(); - mChild = mComposerClient->createSurface(String8("Child surface"), 10, 10, + mChild = mComposerClient->createSurface(String8("Child surface"), 0, 0, PIXEL_FORMAT_RGBA_8888, ISurfaceComposerClient::eFXSurfaceColor, mFGSurfaceControl.get()); @@ -1222,6 +1222,7 @@ protected: TransactionScope ts(*sFakeComposer); ts.setColor(mChild, {LIGHT_GRAY.r / 255.0f, LIGHT_GRAY.g / 255.0f, LIGHT_GRAY.b / 255.0f}); + ts.setCrop_legacy(mChild, Rect(0, 0, 10, 10)); } sFakeComposer->runVSyncAndWait(); |