From cd30d49ee21fd874feccb27e149b2934118b965f Mon Sep 17 00:00:00 2001 From: Anjaneya Prasad Musunuri Date: Thu, 14 Dec 2017 16:24:56 +0530 Subject: [PATCH] gralloc1: Get color space from metadata handle Get color space from metadata handle when color metadata is not defined Change-Id: Ibeb0ce187e6c5b59d626345cf4d0d275c67df034 CRs-Fixed: 2160262 --- libgralloc1/gr_buf_mgr.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libgralloc1/gr_buf_mgr.cpp b/libgralloc1/gr_buf_mgr.cpp index 8aeee40d..1e461d5c 100644 --- a/libgralloc1/gr_buf_mgr.cpp +++ b/libgralloc1/gr_buf_mgr.cpp @@ -692,8 +692,11 @@ gralloc1_error_t BufferManager::Perform(int operation, va_list args) { break; } break; + } else if (getMetaData(hnd, GET_COLOR_SPACE, color_space) != 0) { + *color_space = 0; } - if (getMetaData(hnd, GET_COLOR_SPACE, &color_metadata) != 0) { +#else + if (getMetaData(hnd, GET_COLOR_SPACE, color_space) != 0) { *color_space = 0; } #endif