diff options
author | Austin Hu <austin.hu@intel.com> | 2017-02-13 14:27:03 +0800 |
---|---|---|
committer | Daniel Cardenas <danielcar@google.com> | 2017-02-21 20:01:52 -0800 |
commit | bd7132d1373594bb88313f5c43829f9e827f0131 (patch) | |
tree | f6a85649215b9ed46ac72b36db5aae56c18fd1bb | |
parent | e53278451466870e61bb24f1b162f663dee73055 (diff) | |
download | hwcomposer-bd7132d1373594bb88313f5c43829f9e827f0131.tar.gz |
Fixed the plane assignment issue for HWC2On1 Adaptor.
Bug: 33487853
BZ: IMINAN-51296
Author: Hao Liu <hao.liu@intel.com>
And fixed the screen flickering issue when switching frames with
different FRAMEBUFFER_TARGET layers, by updating the arguments
(including gralloc buffer handle) of FBT layer.
Test: Invoked youtube video
Change-Id: Ib3eeb273526e51352dbd1fc574e0993698150c9c
Signed-off-by: Austin Hu <austin.hu@intel.com>
-rwxr-xr-x | moorefield_hdmi/common/base/HwcLayerList.cpp | 8 | ||||
-rwxr-xr-x | moorefield_hdmi/common/base/HwcLayerList.h | 2 | ||||
-rwxr-xr-x | moorefield_hdmi/common/devices/PhysicalDevice.cpp | 4 |
3 files changed, 14 insertions, 0 deletions
diff --git a/moorefield_hdmi/common/base/HwcLayerList.cpp b/moorefield_hdmi/common/base/HwcLayerList.cpp index c163c8a..a05b4ca 100755 --- a/moorefield_hdmi/common/base/HwcLayerList.cpp +++ b/moorefield_hdmi/common/base/HwcLayerList.cpp @@ -267,6 +267,10 @@ bool HwcLayerList::initialize() DEINIT_AND_RETURN_FALSE("layer %d is null", i); } + if ((layer->compositionType != HWC_FRAMEBUFFER_TARGET) && + (layer->compositionType != HWC_SIDEBAND)) + layer->compositionType = HWC_FRAMEBUFFER; + HwcLayer *hwcLayer = new HwcLayer(i, layer); if (!hwcLayer) { DEINIT_AND_RETURN_FALSE("failed to allocate hwc layer %d", i); @@ -786,6 +790,10 @@ void HwcLayerList::setupSmartComposition() } } +void HwcLayerList::updateFBT(hwc_display_contents_1_t *list) { + mFrameBufferTarget->update(&list->hwLayers[mLayerCount - 1]); +} + #if 1 // support overlay fallback to GLES bool HwcLayerList::update(hwc_display_contents_1_t *list) diff --git a/moorefield_hdmi/common/base/HwcLayerList.h b/moorefield_hdmi/common/base/HwcLayerList.h index f933e7a..819e21d 100755 --- a/moorefield_hdmi/common/base/HwcLayerList.h +++ b/moorefield_hdmi/common/base/HwcLayerList.h @@ -42,6 +42,8 @@ public: void postFlip(); + void updateFBT(hwc_display_contents_1_t *list); + // dump interface virtual void dump(Dump& d); diff --git a/moorefield_hdmi/common/devices/PhysicalDevice.cpp b/moorefield_hdmi/common/devices/PhysicalDevice.cpp index 6b477ae..966a90a 100755 --- a/moorefield_hdmi/common/devices/PhysicalDevice.cpp +++ b/moorefield_hdmi/common/devices/PhysicalDevice.cpp @@ -125,6 +125,10 @@ bool PhysicalDevice::commit(hwc_display_contents_1_t *display, IDisplayContext * if (!display || !context || !mLayerList || mBlank) { return true; } + + /* Sync the arguments of Frame Buffer Target layer updated in SurfaceFlinger. */ + mLayerList->updateFBT(display); + return context->commitContents(display, mLayerList); } |