diff options
author | Mathias Agopian <mathias@google.com> | 2010-10-25 13:31:11 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-10-25 13:31:11 -0700 |
commit | 38e5c8ef89065ee3dfd7721d20df8c061f219168 (patch) | |
tree | 27d087b584ca5577de0aea0e6128467b550555d9 | |
parent | 24b59dd299b2877610113211989235e3100fc1cb (diff) | |
parent | d3caac954c3d6f2e4b4d4a5f13a570a2a15f8667 (diff) | |
download | frameworks_native-38e5c8ef89065ee3dfd7721d20df8c061f219168.zip frameworks_native-38e5c8ef89065ee3dfd7721d20df8c061f219168.tar.gz frameworks_native-38e5c8ef89065ee3dfd7721d20df8c061f219168.tar.bz2 |
Merge "fix [3123221] Video sticks playing back upside down following orientation switch" into gingerbread
-rw-r--r-- | services/surfaceflinger/LayerBuffer.cpp | 13 | ||||
-rw-r--r-- | services/surfaceflinger/LayerBuffer.h | 3 |
2 files changed, 16 insertions, 0 deletions
diff --git a/services/surfaceflinger/LayerBuffer.cpp b/services/surfaceflinger/LayerBuffer.cpp index 87cabed..ccaad51 100644 --- a/services/surfaceflinger/LayerBuffer.cpp +++ b/services/surfaceflinger/LayerBuffer.cpp @@ -132,6 +132,14 @@ void LayerBuffer::unlockPageFlip(const Transform& planeTransform, LayerBase::unlockPageFlip(planeTransform, outDirtyRegion); } +void LayerBuffer::validateVisibility(const Transform& globalTransform) +{ + sp<Source> source(getSource()); + if (source != 0) + source->onvalidateVisibility(globalTransform); + LayerBase::validateVisibility(globalTransform); +} + void LayerBuffer::drawForSreenShot() const { const DisplayHardware& hw(graphicPlane(0).displayHardware()); @@ -641,6 +649,11 @@ void LayerBuffer::OverlaySource::onTransaction(uint32_t flags) } } +void LayerBuffer::OverlaySource::onvalidateVisibility(const Transform&) +{ + mVisibilityChanged = true; +} + void LayerBuffer::OverlaySource::onVisibilityResolved( const Transform& planeTransform) { diff --git a/services/surfaceflinger/LayerBuffer.h b/services/surfaceflinger/LayerBuffer.h index fece858..a89d8fe 100644 --- a/services/surfaceflinger/LayerBuffer.h +++ b/services/surfaceflinger/LayerBuffer.h @@ -44,6 +44,7 @@ class LayerBuffer : public LayerBaseClient virtual void onDraw(const Region& clip) const; virtual void onTransaction(uint32_t flags); virtual void onVisibilityResolved(const Transform& planeTransform); + virtual void onvalidateVisibility(const Transform& globalTransform) { } virtual void postBuffer(ssize_t offset); virtual void unregisterBuffers(); virtual void destroy() { } @@ -67,6 +68,7 @@ public: virtual void drawForSreenShot() const; virtual uint32_t doTransaction(uint32_t flags); virtual void unlockPageFlip(const Transform& planeTransform, Region& outDirtyRegion); + virtual void validateVisibility(const Transform& globalTransform); status_t registerBuffers(const ISurface::BufferHeap& buffers); void postBuffer(ssize_t offset); @@ -153,6 +155,7 @@ private: virtual void onDraw(const Region& clip) const; virtual void onTransaction(uint32_t flags); virtual void onVisibilityResolved(const Transform& planeTransform); + virtual void onvalidateVisibility(const Transform& globalTransform); virtual void destroy(); private: |