From 0d48072f6047140119ff194c1194ce402fca2c0b Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Tue, 10 Jan 2017 16:42:54 -0800 Subject: Add deferTransaction variant taking GraphicBufferProducer. For SurfaceView using child layers, the client framework will not have access to the Handle* for the parent surface, but still needs a way to defer transactions to it's frames. Test: Tested with corresponding SurfaceView modifications and existing tests. Change-Id: I6f01c360e85a95ff0ab08db406741221152e5d5c --- libs/gui/SurfaceControl.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libs/gui/SurfaceControl.cpp') diff --git a/libs/gui/SurfaceControl.cpp b/libs/gui/SurfaceControl.cpp index 0362216258..94094e5a51 100644 --- a/libs/gui/SurfaceControl.cpp +++ b/libs/gui/SurfaceControl.cpp @@ -170,6 +170,13 @@ status_t SurfaceControl::deferTransactionUntil(const sp& handle, return mClient->deferTransactionUntil(mHandle, handle, frameNumber); } +status_t SurfaceControl::deferTransactionUntil(const sp& handle, + uint64_t frameNumber) { + status_t err = validate(); + if (err < 0) return err; + return mClient->deferTransactionUntil(mHandle, handle, frameNumber); +} + status_t SurfaceControl::reparentChildren(const sp& newParentHandle) { status_t err = validate(); if (err < 0) return err; -- cgit v1.2.3-59-g8ed1b