Commit 54565a94 authored by Bhushan Shah's avatar Bhushan Shah 📱

[platforms/hwcomposer] Few fixes for hwcomposer platforms

- Actually use double layered compositing, previously both layers were
of type HWC_FRAMEBUFFER, instead of 2nd layer being
HWC_FRAMEBUFFER_TARGET. Thanks to @NotKit on telegram for pointing this

- Use sourceCropf instead of sourceCrop, as sourceCrop is legacy option.

Test Plan: have to test on actual device, but test_hwcomposer does have similar code.

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision:
parent 7739dea3
......@@ -394,16 +394,23 @@ void HwcomposerBackend::wakeVSync()
static void initLayer(hwc_layer_1_t *layer, const hwc_rect_t &rect)
static void initLayer(hwc_layer_1_t *layer, const hwc_rect_t &rect, int layerCompositionType)
memset(layer, 0, sizeof(hwc_layer_1_t));
layer->compositionType = HWC_FRAMEBUFFER;
layer->compositionType = layerCompositionType;
layer->hints = 0;
layer->flags = 0;
layer->handle = 0;
layer->transform = 0;
layer->blending = HWC_BLENDING_NONE;
layer-> = 0.0f;
layer->sourceCropf.left = 0.0f;
layer->sourceCropf.bottom = (float) rect.bottom;
layer->sourceCropf.right = (float) rect.right;
layer->sourceCrop = rect;
layer->displayFrame = rect;
layer->visibleRegionScreen.numRects = 1;
layer->visibleRegionScreen.rects = &layer->displayFrame;
......@@ -434,8 +441,8 @@ HwcomposerWindow::HwcomposerWindow(HwcomposerBackend *backend)
initLayer(&list->hwLayers[0], rect);
initLayer(&list->hwLayers[1], rect);
initLayer(&list->hwLayers[0], rect, HWC_FRAMEBUFFER);
initLayer(&list->hwLayers[1], rect, HWC_FRAMEBUFFER_TARGET);
list->retireFenceFd = -1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment