test-hwc2: set layer color
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: Ic280f91189a4d6ddd67a33901244714f3c0a46dd
diff --git a/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.h b/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.h
index 86d40cc..f548ea6 100644
--- a/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.h
+++ b/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.h
@@ -35,6 +35,7 @@
void reset();
hwc2_blend_mode_t getBlendMode() const;
+ hwc_color_t getColor() const;
hwc2_composition_t getComposition() const;
android_dataspace_t getDataspace() const;
hwc_rect_t getDisplayFrame() const;
@@ -45,6 +46,7 @@
bool advanceBlendMode();
bool advanceBufferArea();
+ bool advanceColor();
bool advanceComposition();
bool advanceDataspace();
bool advanceDisplayFrame();
@@ -53,13 +55,14 @@
bool advanceTransform();
private:
- std::array<Hwc2TestContainer*, 7> mProperties = {{
- &mBlendMode, &mComposition, &mDataspace, &mDisplayFrame, &mPlaneAlpha,
- &mSourceCrop, &mTransform
+ std::array<Hwc2TestContainer*, 8> mProperties = {{
+ &mBlendMode, &mColor, &mComposition, &mDataspace, &mDisplayFrame,
+ &mPlaneAlpha, &mSourceCrop, &mTransform
}};
Hwc2TestBlendMode mBlendMode;
Hwc2TestBufferArea mBufferArea;
+ Hwc2TestColor mColor;
Hwc2TestComposition mComposition;
Hwc2TestDataspace mDataspace;
Hwc2TestDisplayFrame mDisplayFrame;