Start VTS for color management.
Right now this only makes sure that extended sRGB buffers aren't
corrupted by the time it hits the display. This is especially important
for Ultra HDR, because display compensation is defined by the spec.
Bug: 276331687
Bug: 259144781
Test: VtsHalGraphicsComposer3_ReadbackTest
Change-Id: Ib6c39858289d5559ae76280ca1a0ef756f2daef0
diff --git a/graphics/composer/aidl/vts/ReadbackVts.h b/graphics/composer/aidl/vts/ReadbackVts.h
index d5602c1..ee20573 100644
--- a/graphics/composer/aidl/vts/ReadbackVts.h
+++ b/graphics/composer/aidl/vts/ReadbackVts.h
@@ -42,6 +42,9 @@
static const Color GREEN = {0.0f, 1.0f, 0.0f, 1.0f};
static const Color BLUE = {0.0f, 0.0f, 1.0f, 1.0f};
static const Color WHITE = {1.0f, 1.0f, 1.0f, 1.0f};
+static const Color LIGHT_RED = {0.5f, 0.0f, 0.0f, 1.0f};
+static const Color LIGHT_GREEN = {0.0f, 0.5f, 0.0f, 1.0f};
+static const Color LIGHT_BLUE = {0.0f, 0.0f, 0.5f, 1.0f};
class TestRenderEngine;
@@ -71,6 +74,8 @@
mSurfaceDamage = std::move(surfaceDamage);
}
+ void setDataspace(Dataspace dataspace) { mDataspace = dataspace; }
+
void setTransform(Transform transform) { mTransform = transform; }
void setAlpha(float alpha) { mAlpha = alpha; }
void setBlendMode(BlendMode blendMode) { mBlendMode = blendMode; }
@@ -98,6 +103,7 @@
float mAlpha = 1.0;
BlendMode mBlendMode = BlendMode::NONE;
uint32_t mZOrder = 0;
+ Dataspace mDataspace = Dataspace::UNKNOWN;
};
class TestColorLayer : public TestLayer {
@@ -130,8 +136,6 @@
void setBuffer(std::vector<Color> colors);
- void setDataspace(Dataspace dataspace, ComposerClientWriter& writer);
-
void setToClientComposition(ComposerClientWriter& writer);
uint32_t getWidth() const { return mWidth; }
@@ -185,6 +189,9 @@
static void compareColorBuffers(const std::vector<Color>& expectedColors, void* bufferData,
const uint32_t stride, const uint32_t width,
const uint32_t height, PixelFormat pixelFormat);
+ static void compareColorBuffers(void* expectedBuffer, void* actualBuffer, const uint32_t stride,
+ const uint32_t width, const uint32_t height,
+ PixelFormat pixelFormat);
};
class ReadbackBuffer {
@@ -196,6 +203,8 @@
void checkReadbackBuffer(const std::vector<Color>& expectedColors);
+ ::android::sp<::android::GraphicBuffer> getBuffer();
+
protected:
uint32_t mWidth;
uint32_t mHeight;