From b1e2f8deb38353e4bcc9d3ef06bc15bd5e417425 Mon Sep 17 00:00:00 2001 From: Jorim Jaggi Date: Thu, 8 Jun 2017 15:43:59 -0700 Subject: Properly run window animations at vsync-sf (2/2) - Add new Choreographer instance that runs on vsync-sf - Use this new Choreographer for WindowAnimator, and remove all the hacks around it Test: Open apps and close apps, notice no stutter Test: Screen zoom animations Test: go/wm-smoke Bug: 36631902 Change-Id: I72a8b39709303a38fc077100229b8a81a153ba3e --- libs/gui/ISurfaceComposer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libs/gui/ISurfaceComposer.cpp') diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp index 2516fb8a2d..0a0d112af6 100644 --- a/libs/gui/ISurfaceComposer.cpp +++ b/libs/gui/ISurfaceComposer.cpp @@ -201,7 +201,7 @@ public: return NO_ERROR; } - virtual sp createDisplayEventConnection() + virtual sp createDisplayEventConnection(VsyncSource vsyncSource) { Parcel data, reply; sp result; @@ -210,6 +210,7 @@ public: if (err != NO_ERROR) { return result; } + data.writeInt32(static_cast(vsyncSource)); err = remote()->transact( BnSurfaceComposer::CREATE_DISPLAY_EVENT_CONNECTION, data, &reply); @@ -586,7 +587,8 @@ status_t BnSurfaceComposer::onTransact( } case CREATE_DISPLAY_EVENT_CONNECTION: { CHECK_INTERFACE(ISurfaceComposer, data, reply); - sp connection(createDisplayEventConnection()); + sp connection(createDisplayEventConnection( + static_cast(data.readInt32()))); reply->writeStrongBinder(IInterface::asBinder(connection)); return NO_ERROR; } -- cgit v1.2.3-59-g8ed1b