test-hwc2: set cursor position
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: I4b265826befcf33c3f71b52bfabc076c48efed5f
diff --git a/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.cpp b/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.cpp
index caf3987..2a5a1af 100644
--- a/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.cpp
+++ b/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.cpp
@@ -72,6 +72,12 @@
return mComposition.get();
}
+/* The cursor position corresponds to {displayFrame.left, displayFrame.top} */
+hwc_rect_t Hwc2TestLayer::getCursorPosition() const
+{
+ return mDisplayFrame.get();
+}
+
android_dataspace_t Hwc2TestLayer::getDataspace() const
{
return mDataspace.get();
@@ -122,6 +128,11 @@
return mComposition.advance();
}
+bool Hwc2TestLayer::advanceCursorPosition()
+{
+ return mDisplayFrame.advance();
+}
+
bool Hwc2TestLayer::advanceDataspace()
{
return mDataspace.advance();