summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmoorefield_hdmi/common/base/HwcLayerList.cpp8
-rwxr-xr-xmoorefield_hdmi/common/base/HwcLayerList.h2
-rwxr-xr-xmoorefield_hdmi/common/devices/PhysicalDevice.cpp4
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);
}