summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2012-11-14 14:41:42 -0800
committerMathias Agopian <mathias@google.com>2012-11-14 14:41:42 -0800
commitee932d0ad1a16cc93b4bd9eaf9cb3cc756fb2dfc (patch)
tree0408d0fdf0b16517683fc78fc7cb17839703eb60
parent3fdeb48e3c89be15fe3b539a26ec9a3cf28c898c (diff)
downloadframeworks_native-ee932d0ad1a16cc93b4bd9eaf9cb3cc756fb2dfc.zip
frameworks_native-ee932d0ad1a16cc93b4bd9eaf9cb3cc756fb2dfc.tar.gz
frameworks_native-ee932d0ad1a16cc93b4bd9eaf9cb3cc756fb2dfc.tar.bz2
Reset compositionType to HWC_FRAMEBUFFER before calling prepare()
Honor the documentation. this broke in JB-MR1. Change-Id: I841a93b409fc940374bc748c4e143d82a192669c
-rw-r--r--services/surfaceflinger/DisplayHardware/HWComposer.cpp4
-rw-r--r--services/surfaceflinger/DisplayHardware/HWComposer.h1
-rw-r--r--services/surfaceflinger/LayerBase.cpp1
3 files changed, 5 insertions, 1 deletions
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
index 31d731e..29b778d 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
@@ -803,7 +803,9 @@ public:
virtual void setAcquireFenceFd(int fenceFd) {
getLayer()->acquireFenceFd = fenceFd;
}
-
+ virtual void setPerFrameDefaultState() {
+ getLayer()->compositionType = HWC_FRAMEBUFFER;
+ }
virtual void setDefaultState() {
getLayer()->compositionType = HWC_FRAMEBUFFER;
getLayer()->hints = 0;
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.h b/services/surfaceflinger/DisplayHardware/HWComposer.h
index a78ffac..7c67407 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.h
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.h
@@ -141,6 +141,7 @@ public:
virtual int32_t getCompositionType() const = 0;
virtual uint32_t getHints() const = 0;
virtual int getAndResetReleaseFenceFd() = 0;
+ virtual void setPerFrameDefaultState() = 0;
virtual void setDefaultState() = 0;
virtual void setSkip(bool skip) = 0;
virtual void setBlending(uint32_t blending) = 0;
diff --git a/services/surfaceflinger/LayerBase.cpp b/services/surfaceflinger/LayerBase.cpp
index db4ef87..9b03c74 100644
--- a/services/surfaceflinger/LayerBase.cpp
+++ b/services/surfaceflinger/LayerBase.cpp
@@ -300,6 +300,7 @@ void LayerBase::setGeometry(
void LayerBase::setPerFrameData(const sp<const DisplayDevice>& hw,
HWComposer::HWCLayerInterface& layer) {
+ layer.setPerFrameDefaultState();
// we have to set the visible region on every frame because
// we currently free it during onLayerDisplayed(), which is called
// after HWComposer::commit() -- every frame.