test-hwc2: set layer buffer
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: Ie42d1fd4c2d0248c4a3ecf09a9b5871d501f6172
diff --git a/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.h b/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.h
index f5b2c39..27885ab 100644
--- a/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.h
+++ b/services/surfaceflinger/tests/hwc2/Hwc2TestLayer.h
@@ -17,6 +17,9 @@
#ifndef _HWC2_TEST_LAYER_H
#define _HWC2_TEST_LAYER_H
+#include <android-base/unique_fd.h>
+
+#include "Hwc2TestBuffer.h"
#include "Hwc2TestProperties.h"
#define HWC2_INCLUDE_STRINGIFICATION
@@ -32,6 +35,9 @@
std::string dump() const;
+ int getBuffer(buffer_handle_t* outHandle,
+ android::base::unique_fd* outAcquireFence);
+
void reset();
hwc2_blend_mode_t getBlendMode() const;
@@ -64,6 +70,8 @@
&mPlaneAlpha, &mSourceCrop, &mSurfaceDamage, &mTransform
}};
+ Hwc2TestBuffer mBuffer;
+
Hwc2TestBlendMode mBlendMode;
Hwc2TestBufferArea mBufferArea;
Hwc2TestColor mColor;