summaryrefslogtreecommitdiff
path: root/ips
diff options
context:
space:
mode:
authorGu, Wangyi <wangyi.gu@intel.com>2013-07-30 21:27:40 +0800
committercactus <cactus@intel.com>2013-08-07 08:36:14 -0700
commitde2f6c3bfb8ac09d42ce12f0206d2ee0d2443527 (patch)
tree40d4846fcabb49919f8e878bd1ae2005c38680b7 /ips
parent51e60f4b4281bb3de182641f9cfe63a7f99bef3b (diff)
downloadhwcomposer-de2f6c3bfb8ac09d42ce12f0206d2ee0d2443527.tar.gz
hwc: disable overlay if the layer has a tranform with YV12 format
BZ: 124382 Root cause: In MRFLD, YV12 format goes through overlay path while ST in CTP. In the landscape mode, YV12 doesn't have rotated buffer, which make the overlay layer update failed, and the NV12 overlay buffer is not updated, so this issue happen. This patch merges the functionality of PlaneCapabilities::isTransformSupported into PlaneCapabilities::isFormatSupported. Change-Id: I560b9fb65705e9545838196b35d3cb4bf674210f Signed-off-by: Gu, Wangyi <wangyi.gu@intel.com> Reviewed-on: http://android.intel.com:8080/121931 Reviewed-by: buildbot <buildbot@intel.com> Reviewed-by: Qiu, Junhai <junhai.qiu@intel.com> Reviewed-by: Ma, Hongpeng <hongpeng.ma@intel.com> Reviewed-by: Feng, Wei <wei.feng@intel.com> Reviewed-by: Shi, PingX <pingx.shi@intel.com> Tested-by: Shi, PingX <pingx.shi@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
Diffstat (limited to 'ips')
-rw-r--r--ips/common/PlaneCapabilities.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/ips/common/PlaneCapabilities.cpp b/ips/common/PlaneCapabilities.cpp
index 2de36ff..0529629 100644
--- a/ips/common/PlaneCapabilities.cpp
+++ b/ips/common/PlaneCapabilities.cpp
@@ -35,7 +35,7 @@
namespace android {
namespace intel {
-bool PlaneCapabilities::isFormatSupported(int planeType, uint32_t format)
+bool PlaneCapabilities::isFormatSupported(int planeType, uint32_t format, uint32_t trans)
{
if (planeType == DisplayPlane::PLANE_SPRITE || planeType == DisplayPlane::PLANE_PRIMARY) {
switch (format) {
@@ -44,7 +44,7 @@ bool PlaneCapabilities::isFormatSupported(int planeType, uint32_t format)
case HAL_PIXEL_FORMAT_RGBA_8888:
case HAL_PIXEL_FORMAT_RGBX_8888:
case HAL_PIXEL_FORMAT_RGB_565:
- return true;
+ return trans ? false : true;
default:
VTRACE("unsupported format %#x", format);
return false;
@@ -52,6 +52,7 @@ bool PlaneCapabilities::isFormatSupported(int planeType, uint32_t format)
} else if (planeType == DisplayPlane::PLANE_OVERLAY) {
switch (format) {
case HAL_PIXEL_FORMAT_YV12:
+ return trans ? false : true;
case HAL_PIXEL_FORMAT_I420:
case OMX_INTEL_COLOR_FormatYUV420PackedSemiPlanar:
case HAL_PIXEL_FORMAT_YUY2: