test-hwc2: set layer blend mode
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: Id5a7a568fb81ac9aff388d04077a12765cc135a3
diff --git a/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.h b/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.h
index 9734ab8..a4d6d1d 100644
--- a/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.h
+++ b/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.h
@@ -33,11 +33,18 @@
void reset();
+ hwc2_blend_mode_t getBlendMode() const;
hwc2_composition_t getComposition() const;
+ bool advanceBlendMode();
bool advanceComposition();
private:
+ std::array<Hwc2TestContainer*, 2> mProperties = {{
+ &mBlendMode, &mComposition
+ }};
+
+ Hwc2TestBlendMode mBlendMode;
Hwc2TestComposition mComposition;
};