test-hwc2: set layer plane alpha
Test: Add "#define HAVE_NO_SURFACE_FLINGER" to
frameworks/native/libs/gui/BufferQueueCore.cpp.
Recompile and flash.
Run "mm" in frameworks/native/services/surfaceflinger/tests/hwc2.
Push test-hwc2 to device.
Run "adb root && adb shell stop".
Run test case. Ex: "./test-hwc2"
Change-Id: I48146953f745dc650ead5a6e9d6f456cf5a9d7ef
diff --git a/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.h b/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.h
index b07fe7b..5ba2cfc 100644
--- a/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.h
+++ b/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.h
@@ -36,19 +36,22 @@
hwc2_blend_mode_t getBlendMode() const;
hwc2_composition_t getComposition() const;
android_dataspace_t getDataspace() const;
+ float getPlaneAlpha() const;
bool advanceBlendMode();
bool advanceComposition();
bool advanceDataspace();
+ bool advancePlaneAlpha();
private:
- std::array<Hwc2TestContainer*, 3> mProperties = {{
- &mBlendMode, &mComposition, &mDataspace
+ std::array<Hwc2TestContainer*, 4> mProperties = {{
+ &mBlendMode, &mComposition, &mDataspace, &mPlaneAlpha
}};
Hwc2TestBlendMode mBlendMode;
Hwc2TestComposition mComposition;
Hwc2TestDataspace mDataspace;
+ Hwc2TestPlaneAlpha mPlaneAlpha;
};
#endif /* ifndef _HWC2_TEST_LAYER_H */