test-hwc2: set layer dataspace
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: Ia5bc9e53815d519e2016f3db12d69c6cc70a9b26
diff --git a/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.h b/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.h
index a4d6d1d..b07fe7b 100644
--- a/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.h
+++ b/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.h
@@ -33,19 +33,22 @@
void reset();
- hwc2_blend_mode_t getBlendMode() const;
- hwc2_composition_t getComposition() const;
+ hwc2_blend_mode_t getBlendMode() const;
+ hwc2_composition_t getComposition() const;
+ android_dataspace_t getDataspace() const;
bool advanceBlendMode();
bool advanceComposition();
+ bool advanceDataspace();
private:
- std::array<Hwc2TestContainer*, 2> mProperties = {{
- &mBlendMode, &mComposition
+ std::array<Hwc2TestContainer*, 3> mProperties = {{
+ &mBlendMode, &mComposition, &mDataspace
}};
Hwc2TestBlendMode mBlendMode;
Hwc2TestComposition mComposition;
+ Hwc2TestDataspace mDataspace;
};
#endif /* ifndef _HWC2_TEST_LAYER_H */