diff --git a/libhwcomposer/hwc_copybit.cpp b/libhwcomposer/hwc_copybit.cpp index 3a4bada0..b111661a 100644 --- a/libhwcomposer/hwc_copybit.cpp +++ b/libhwcomposer/hwc_copybit.cpp @@ -177,7 +177,7 @@ bool CopyBit::prepare(hwc_context_t *ctx, hwc_display_contents_1_t *list, return true; hwc_rect_t sourceCrop = integerizeSourceCrop(layer->sourceCropf); - if (layer->transform & HAL_TRANSFORM_ROT_90) { + if (has90Transform(layer)) { src_h = sourceCrop.right - sourceCrop.left; src_w = sourceCrop.bottom - sourceCrop.top; } else { diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp index d8642909..8f2a6e80 100644 --- a/libhwcomposer/hwc_mdpcomp.cpp +++ b/libhwcomposer/hwc_mdpcomp.cpp @@ -603,9 +603,10 @@ bool MDPComp::tryFullFrame(hwc_context_t *ctx, //For 8x26 with panel width>1k, if RGB layer needs HFLIP fail mdp comp // may not need it if Gfx pre-rotation can handle all flips & rotations + int transform = (layer->flags & HWC_COLOR_FILL) ? 0 : layer->transform; if(qdutils::MDPVersion::getInstance().is8x26() && (ctx->dpyAttr[mDpy].xres > 1024) && - (layer->transform & HWC_TRANSFORM_FLIP_H) && + (transform & HWC_TRANSFORM_FLIP_H) && (!isYuvBuffer(hnd))) return false; } diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp index 5c363041..8a42b389 100644 --- a/libhwcomposer/hwc_utils.cpp +++ b/libhwcomposer/hwc_utils.cpp @@ -751,8 +751,10 @@ static void trimList(hwc_context_t *ctx, hwc_display_contents_1_t *list, for(uint32_t i = 0; i < list->numHwLayers - 1; i++) { hwc_layer_1_t *layer = &list->hwLayers[i]; hwc_rect_t crop = integerizeSourceCrop(layer->sourceCropf); + int transform = (list->hwLayers[i].flags & HWC_COLOR_FILL) ? 0 : + list->hwLayers[i].transform; trimLayer(ctx, dpy, - list->hwLayers[i].transform, + transform, (hwc_rect_t&)crop, (hwc_rect_t&)list->hwLayers[i].displayFrame); layer->sourceCropf.left = crop.left; @@ -1145,7 +1147,8 @@ void optimizeLayerRects(const hwc_display_contents_1_t *list) { hwc_rect_t& bottomframe = layer->displayFrame; hwc_rect_t bottomCrop = integerizeSourceCrop(layer->sourceCropf); - int transform =layer->transform; + int transform = (layer->flags & HWC_COLOR_FILL) ? 0 : + layer->transform; hwc_rect_t irect = getIntersection(bottomframe, topframe); if(isValidRect(irect)) {