summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-09-17 16:18:16 -0700
committerMathias Agopian <mathias@google.com>2009-09-17 16:18:16 -0700
commitb1a1874625a6aca967601fcda53a82d8d712df45 (patch)
tree3cf96bf9cc4bf734da47e58cab3c5421e7698139 /libs/surfaceflinger
parentd55de40481c6ec7d8fbd1a38c80a6c66bf462a71 (diff)
downloadframeworks_base-b1a1874625a6aca967601fcda53a82d8d712df45.zip
frameworks_base-b1a1874625a6aca967601fcda53a82d8d712df45.tar.gz
frameworks_base-b1a1874625a6aca967601fcda53a82d8d712df45.tar.bz2
Android side of the fix for [2121211] Sholes has stutter during animations
a new method, compostionComplete() is added to the framebuffer hal, it is used by surfaceflinger to signal the driver that the composition is complete, BEFORE it releases its client. This gives a chance to the driver to
Diffstat (limited to 'libs/surfaceflinger')
-rw-r--r--libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp6
-rw-r--r--libs/surfaceflinger/DisplayHardware/DisplayHardware.h2
-rw-r--r--libs/surfaceflinger/SurfaceFlinger.cpp3
3 files changed, 8 insertions, 3 deletions
diff --git a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
index cc913cb..7bdf885 100644
--- a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
+++ b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
@@ -297,9 +297,9 @@ uint32_t DisplayHardware::getPageFlipCount() const {
return mPageFlipCount;
}
-/*
- * "Flip" the front and back buffers.
- */
+status_t DisplayHardware::compositionComplete() const {
+ return mNativeWindow->compositionComplete();
+}
void DisplayHardware::flip(const Region& dirty) const
{
diff --git a/libs/surfaceflinger/DisplayHardware/DisplayHardware.h b/libs/surfaceflinger/DisplayHardware/DisplayHardware.h
index 8972d51..b7f1cdb 100644
--- a/libs/surfaceflinger/DisplayHardware/DisplayHardware.h
+++ b/libs/surfaceflinger/DisplayHardware/DisplayHardware.h
@@ -80,6 +80,8 @@ public:
EGLDisplay getEGLDisplay() const { return mDisplay; }
overlay_control_device_t* getOverlayEngine() const { return mOverlayEngine; }
+ status_t compositionComplete() const;
+
Rect bounds() const {
return Rect(mWidth, mHeight);
}
diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp
index 31b5128..e87b563 100644
--- a/libs/surfaceflinger/SurfaceFlinger.cpp
+++ b/libs/surfaceflinger/SurfaceFlinger.cpp
@@ -495,6 +495,9 @@ bool SurfaceFlinger::threadLoop()
// repaint the framebuffer (if needed)
handleRepaint();
+ // inform the h/w that we're done compositing
+ hw.compositionComplete();
+
// release the clients before we flip ('cause flip might block)
unlockClients();