summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-10-25 13:31:11 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-10-25 13:31:11 -0700
commit38e5c8ef89065ee3dfd7721d20df8c061f219168 (patch)
tree27d087b584ca5577de0aea0e6128467b550555d9
parent24b59dd299b2877610113211989235e3100fc1cb (diff)
parentd3caac954c3d6f2e4b4d4a5f13a570a2a15f8667 (diff)
downloadframeworks_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.cpp13
-rw-r--r--services/surfaceflinger/LayerBuffer.h3
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: