diff options
author | Rob Carr | 2016-04-13 13:58:42 -0500 |
---|---|---|
committer | Android (Google) Code Review | 2016-04-13 13:58:42 -0500 |
commit | dc71bebc3d65918ec5c1c7cea1dae0a0af5468d7 (patch) | |
tree | dbae1454a20be83193400688d5599444fdeb7f1b /include | |
parent | ef1081f96d3c3915fe84c505674fbd70170ed284 (diff) | |
parent | 9f31e299b3ec93b7bac969846105e7e926e3efcd (diff) | |
download | frameworks-native-dc71bebc3d65918ec5c1c7cea1dae0a0af5468d7.tar.gz frameworks-native-dc71bebc3d65918ec5c1c7cea1dae0a0af5468d7.tar.xz frameworks-native-dc71bebc3d65918ec5c1c7cea1dae0a0af5468d7.zip |
Merge "Add Surface::waitForNextFrame" into nyc-dev
Diffstat (limited to 'include')
-rw-r--r-- | include/gui/Surface.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/gui/Surface.h b/include/gui/Surface.h index 5d1d7bff8..f76a9beef 100644 --- a/include/gui/Surface.h +++ b/include/gui/Surface.h | |||
@@ -122,6 +122,13 @@ public: | |||
122 | // See IGraphicBufferProducer::setDequeueTimeout | 122 | // See IGraphicBufferProducer::setDequeueTimeout |
123 | status_t setDequeueTimeout(nsecs_t timeout); | 123 | status_t setDequeueTimeout(nsecs_t timeout); |
124 | 124 | ||
125 | /* | ||
126 | * Wait for frame number to increase past lastFrame for at most | ||
127 | * timeoutNs. Useful for one thread to wait for another unknown | ||
128 | * thread to queue a buffer. | ||
129 | */ | ||
130 | bool waitForNextFrame(uint64_t lastFrame, nsecs_t timeout); | ||
131 | |||
125 | protected: | 132 | protected: |
126 | virtual ~Surface(); | 133 | virtual ~Surface(); |
127 | 134 | ||
@@ -348,6 +355,8 @@ private: | |||
348 | // This is true if the shared buffer has already been queued/canceled. It's | 355 | // This is true if the shared buffer has already been queued/canceled. It's |
349 | // used to prevent a mismatch between the number of queue/dequeue calls. | 356 | // used to prevent a mismatch between the number of queue/dequeue calls. |
350 | bool mSharedBufferHasBeenQueued; | 357 | bool mSharedBufferHasBeenQueued; |
358 | |||
359 | Condition mQueueBufferCondition; | ||
351 | }; | 360 | }; |
352 | 361 | ||
353 | namespace view { | 362 | namespace view { |