diff options
author | Mathias Agopian <mathias@google.com> | 2010-10-24 19:03:58 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2010-10-24 19:03:58 -0700 |
commit | d3caac954c3d6f2e4b4d4a5f13a570a2a15f8667 (patch) | |
tree | d3c880d88d163bcd2c88ecbcec30e333d2bbc747 /services/surfaceflinger | |
parent | f35c87350171260ccfb9742bc623e1a4b857c021 (diff) | |
download | frameworks_native-d3caac954c3d6f2e4b4d4a5f13a570a2a15f8667.zip frameworks_native-d3caac954c3d6f2e4b4d4a5f13a570a2a15f8667.tar.gz frameworks_native-d3caac954c3d6f2e4b4d4a5f13a570a2a15f8667.tar.bz2 |
fix [3123221] Video sticks playing back upside down following orientation switch
the overlay wasn't reconfigured when the screen-orientation changed. It was
only done when a parameter of the surface itself changed.
Change-Id: I0ca0925bf58ded4c91ab89d12cb1fe4d1477c96c
Diffstat (limited to 'services/surfaceflinger')
-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: |