summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Kovalivskyi <roman.kovalivskyi@globallogic.com>2019-12-11 17:48:44 +0200
committerRoman Kovalivskyi <roman.kovalivskyi@globallogic.com>2019-12-16 17:54:03 +0200
commitbb37569e6647c92bcdee7a4be42bb5fb003ce0b7 (patch)
tree103eeb44e4aeae8e107adfcc16e4fcfab39f2b29
parentf67c365de917512608cdc6cb3109d1a9cb3ac32b (diff)
drm_hwcomposer: Add simplistic SetLayerColor implementation
VTS tests for SET_LAYER_COLOR fails for now since SetLayerColor is unsupported function. Tis commit tries to address this issue. We can't fully implement it for now, therefore simplistic implementation that just saves argument for future uses and satisfies the interface could be used instead, for now. Commit da5839cf9258 ("drm_hwcomposer: Add support for GetColorModes & SetCursorPosition") implements GetColorModes and SetCursorPosition in the same fashion, simply by adding fields that store this values for future uses, therefore we assume that it is okay to use this approach here too. Signed-off-by: Roman Kovalivskyi <roman.kovalivskyi@globallogic.com>
-rw-r--r--drmhwctwo.cpp6
-rw-r--r--include/drmhwctwo.h1
2 files changed, 5 insertions, 2 deletions
diff --git a/drmhwctwo.cpp b/drmhwctwo.cpp
index c34c0b7..a1f8232 100644
--- a/drmhwctwo.cpp
+++ b/drmhwctwo.cpp
@@ -921,8 +921,10 @@ HWC2::Error DrmHwcTwo::HwcLayer::SetLayerBuffer(buffer_handle_t buffer,
}
HWC2::Error DrmHwcTwo::HwcLayer::SetLayerColor(hwc_color_t color) {
- // TODO: Punt to client composition here?
- return unsupported(__func__, color);
+ // TODO: Put to client composition here?
+ supported(__func__);
+ layer_color_ = color;
+ return HWC2::Error::None;
}
HWC2::Error DrmHwcTwo::HwcLayer::SetLayerCompositionType(int32_t type) {
diff --git a/include/drmhwctwo.h b/include/drmhwctwo.h
index 90cffa4..361bce9 100644
--- a/include/drmhwctwo.h
+++ b/include/drmhwctwo.h
@@ -124,6 +124,7 @@ class DrmHwcTwo : public hwc2_device_t {
hwc_frect_t source_crop_;
int32_t cursor_x_;
int32_t cursor_y_;
+ hwc_color_t layer_color_;
HWC2::Transform transform_ = HWC2::Transform::None;
uint32_t z_order_ = 0;
android_dataspace_t dataspace_ = HAL_DATASPACE_UNKNOWN;