summaryrefslogtreecommitdiff
path: root/libcopybit/copybit_c2d.cpp
diff options
context:
space:
mode:
authorSushil Chauhan <sushilchauhan@codeaurora.org>2013-10-21 17:35:55 -0700
committerSushil Chauhan <sushilchauhan@codeaurora.org>2013-11-13 10:13:19 -0800
commit943797c3615e978c5875723b134192092ef1f60b (patch)
treec7f1d150f9f409ac7507fea00877d6e2e23edc01 /libcopybit/copybit_c2d.cpp
parenta61b88699c0805279e50bd4beb7e917af7be5e17 (diff)
downloaddisplay-943797c3615e978c5875723b134192092ef1f60b.tar.gz
hwc/copybit: Add Color layer support in MDP Copybit composition.
1. Color layer has a destination rectangle, RGBA color and plane alpha. There is no gralloc buffer. Layer flag HWC_COLOR_FILL denotes color layer. MDP BLIT happens via MDP_SOLID_FILL mode. 2. There is no color member in HWC layer, so RGBA color value is passed via "tranform" member from framework to HAL. 3. Update HWC query to enable framework to query for Color layer support in HAL, at run-time. Change-Id: I2c698007c1689779fe86d549093bb5285432dc5f
Diffstat (limited to 'libcopybit/copybit_c2d.cpp')
-rw-r--r--libcopybit/copybit_c2d.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/libcopybit/copybit_c2d.cpp b/libcopybit/copybit_c2d.cpp
index 914bed7c..231bb2d3 100644
--- a/libcopybit/copybit_c2d.cpp
+++ b/libcopybit/copybit_c2d.cpp
@@ -1428,6 +1428,16 @@ static int blit_copybit(
return status;
}
+/** Fill the rect on dst with RGBA color **/
+static int fill_color(struct copybit_device_t *dev,
+ struct copybit_image_t const *dst,
+ struct copybit_rect_t const *rect,
+ uint32_t color)
+{
+ // TODO: Implement once c2d driver supports color fill
+ return -EINVAL;
+}
+
/*****************************************************************************/
static void clean_up(copybit_context_t* ctx)
@@ -1561,6 +1571,7 @@ static int open_copybit(const struct hw_module_t* module, const char* name,
ctx->device.finish = finish_copybit;
ctx->device.flush_get_fence = flush_get_fence_copybit;
ctx->device.clear = clear_copybit;
+ ctx->device.fill_color = fill_color;
/* Create RGB Surface */
surfDefinition.buffer = (void*)0xdddddddd;