diff options
-rw-r--r-- | libhwc2.1/libdevice/ExynosDisplay.cpp | 7 | ||||
-rw-r--r-- | libhwc2.1/libdevice/ExynosDisplay.h | 2 | ||||
-rw-r--r-- | libhwc2.1/libhwchelper/ExynosHWCHelper.h | 2 | ||||
-rw-r--r-- | libhwc2.1/libresource/ExynosResourceManager.cpp | 4 |
4 files changed, 12 insertions, 3 deletions
diff --git a/libhwc2.1/libdevice/ExynosDisplay.cpp b/libhwc2.1/libdevice/ExynosDisplay.cpp index c47a231..d8a605e 100644 --- a/libhwc2.1/libdevice/ExynosDisplay.cpp +++ b/libhwc2.1/libdevice/ExynosDisplay.cpp @@ -2821,9 +2821,12 @@ int32_t ExynosDisplay::setColorTransform( ALOGI("%s:: %d, %d", __func__, mColorTransformHint, hint); if (mColorTransformHint != hint) setGeometryChanged(GEOMETRY_DISPLAY_COLOR_TRANSFORM_CHANGED); - mColorTransformHint = (android_color_transform_t)hint; + mColorTransformHint = hint; #ifdef HWC_SUPPORT_COLOR_TRANSFORM - return mDisplayInterface->setColorTransform(matrix, hint); + int ret = mDisplayInterface->setColorTransform(matrix, hint); + if (ret < 0) + mColorTransformHint = HAL_COLOR_TRANSFORM_ERROR; + return ret; #else return HWC2_ERROR_NONE; #endif diff --git a/libhwc2.1/libdevice/ExynosDisplay.h b/libhwc2.1/libdevice/ExynosDisplay.h index fc98e1f..83410ee 100644 --- a/libhwc2.1/libdevice/ExynosDisplay.h +++ b/libhwc2.1/libdevice/ExynosDisplay.h @@ -379,7 +379,7 @@ class ExynosDisplay { uint32_t mNumMaxPriorityAllowed; int32_t mCursorIndex; - android_color_transform mColorTransformHint; + int32_t mColorTransformHint; ExynosLowFpsLayerInfo mLowFpsLayerInfo; diff --git a/libhwc2.1/libhwchelper/ExynosHWCHelper.h b/libhwc2.1/libhwchelper/ExynosHWCHelper.h index 9fc28ad..1716a16 100644 --- a/libhwc2.1/libhwchelper/ExynosHWCHelper.h +++ b/libhwc2.1/libhwchelper/ExynosHWCHelper.h @@ -56,6 +56,8 @@ class ExynosDisplay; using namespace android; +#define HAL_COLOR_TRANSFORM_ERROR 100 + enum { EXYNOS_HWC_DIM_LAYER = 0x00000001, }; diff --git a/libhwc2.1/libresource/ExynosResourceManager.cpp b/libhwc2.1/libresource/ExynosResourceManager.cpp index 8a6f089..103d763 100644 --- a/libhwc2.1/libresource/ExynosResourceManager.cpp +++ b/libhwc2.1/libresource/ExynosResourceManager.cpp @@ -1094,6 +1094,10 @@ int32_t ExynosResourceManager::validateLayer(uint32_t index, ExynosDisplay *disp #ifndef HWC_SUPPORT_COLOR_TRANSFORM if (display->mColorTransformHint != HAL_COLOR_TRANSFORM_IDENTITY) return eUnSupportedColorTransform; +#else + if ((display->mColorTransformHint == HAL_COLOR_TRANSFORM_ERROR) && + (layer->mOverlayPriority < ePriorityHigh)) + return eUnSupportedColorTransform; #endif if ((display->mLowFpsLayerInfo.mHasLowFpsLayer == true) && |