am f9730c3b: am ee932d0a: Reset compositionType to HWC_FRAMEBUFFER before calling prepare()

* commit 'f9730c3b9655c32fc7ea13159ac5ff2f90fda3f1':
  Reset compositionType to HWC_FRAMEBUFFER before calling prepare()
This commit is contained in:
Mathias Agopian 2012-11-14 16:59:03 -08:00 committed by Android Git Automerger
commit 35d3988616
3 changed files with 5 additions and 1 deletions

View File

@ -803,7 +803,9 @@ public:
virtual void setAcquireFenceFd(int fenceFd) { virtual void setAcquireFenceFd(int fenceFd) {
getLayer()->acquireFenceFd = fenceFd; getLayer()->acquireFenceFd = fenceFd;
} }
virtual void setPerFrameDefaultState() {
getLayer()->compositionType = HWC_FRAMEBUFFER;
}
virtual void setDefaultState() { virtual void setDefaultState() {
getLayer()->compositionType = HWC_FRAMEBUFFER; getLayer()->compositionType = HWC_FRAMEBUFFER;
getLayer()->hints = 0; getLayer()->hints = 0;

View File

@ -141,6 +141,7 @@ public:
virtual int32_t getCompositionType() const = 0; virtual int32_t getCompositionType() const = 0;
virtual uint32_t getHints() const = 0; virtual uint32_t getHints() const = 0;
virtual int getAndResetReleaseFenceFd() = 0; virtual int getAndResetReleaseFenceFd() = 0;
virtual void setPerFrameDefaultState() = 0;
virtual void setDefaultState() = 0; virtual void setDefaultState() = 0;
virtual void setSkip(bool skip) = 0; virtual void setSkip(bool skip) = 0;
virtual void setBlending(uint32_t blending) = 0; virtual void setBlending(uint32_t blending) = 0;

View File

@ -300,6 +300,7 @@ void LayerBase::setGeometry(
void LayerBase::setPerFrameData(const sp<const DisplayDevice>& hw, void LayerBase::setPerFrameData(const sp<const DisplayDevice>& hw,
HWComposer::HWCLayerInterface& layer) { HWComposer::HWCLayerInterface& layer) {
layer.setPerFrameDefaultState();
// we have to set the visible region on every frame because // we have to set the visible region on every frame because
// we currently free it during onLayerDisplayed(), which is called // we currently free it during onLayerDisplayed(), which is called
// after HWComposer::commit() -- every frame. // after HWComposer::commit() -- every frame.