blob: d4cf5f7e2de429b127d4b1fc4b26054bce7f2c91 [file] [log] [blame]
Pawin Vongmasa120c4da2016-12-19 14:49:56 +07001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http: *www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware.media.omx@1.0;
18
19import android.hardware.graphics.common@1.0::Dataspace;
20import android.hardware.graphics.common@1.0::PixelFormat;
21
22import android.hardware.media@1.0::types;
23import IOmxProducerListener;
24
25/**
26 * Ref: frameworks/native/include/gui/IGraphicBufferProducer.h:
27 * IGraphicBufferProducer
28 * This is a wrapper/wrapped HAL interface for the actual binder interface.
29 */
30interface IOmxBufferProducer {
31
32 /**
33 * Ref: frameworks/native/include/ui/FenceTime.h: FenceTime::Snapshot
34 *
35 * An atomic snapshot of the FenceTime that is flattenable.
36 */
37 struct FenceTimeSnapshot {
38 enum State : int32_t {
39 EMPTY,
40 FENCE,
41 SIGNAL_TIME,
42 };
43 State state;
44 Fence fence;
45 int64_t signalTimeNs;
46 };
47
48 /**
49 * Ref: frameworks/native/include/gui/FrameTimestamp.h: FrameEventsDelta
50 *
51 * A single frame update from the consumer to producer that can be sent
52 * through a HIDL interface. Although this may be sent multiple times for
53 * the same frame as new timestamps are set, Fences only need to be sent
54 * once.
55 */
56 struct FrameEventsDelta {
57 uint32_t index;
58 uint64_t frameNumber;
59 bool addPostCompositeCalled;
60 bool addRetireCalled;
61 bool addReleaseCalled;
62 int64_t postedTimeNs;
63 int64_t requestedPresentTimeNs;
64 int64_t latchTimeNs;
65 int64_t firstRefreshStartTimeNs;
66 int64_t lastRefreshStartTimeNs;
67 int64_t dequeueReadyTime;
68 FenceTimeSnapshot gpuCompositionDoneFence;
69 FenceTimeSnapshot displayPresentFence;
70 FenceTimeSnapshot displayRetireFence;
71 FenceTimeSnapshot releaseFence;
72 };
73
74 /**
75 * Ref: frameworks/native/include/gui/FrameTimestamp.h: FrameEventHistoryDelta
76 *
77 * A collection of updates from consumer to producer that can be sent
78 * through a HIDL interface.
79 */
80 typedef vec<FrameEventsDelta> FrameEventHistoryDelta;
81
82 /**
83 * Modes for disconnection.
84 */
85 enum DisconnectMode : int32_t {
86 /** Disconnect only the specified API. */
87 API,
88 /** Disconnect any API originally connected from the process calling
89 * disconnect. */
90 ALL_LOCAL
91 };
92
93 struct QueueBufferInput {
94 /** A monotonically increasing value in nanoseconds. */
95 int64_t timestamp;
96 /** Whether the timestamp was synthesized at queue time. */
97 int32_t isAutoTimestamp;
98 /** Description of the contents, interpretation depends on format. */
99 Dataspace dataSpace;
100 /** A crop rectangle that's used as a hint to the consumer. */
101 Rect crop;
102 /** A set of flags from NATIVE_WINDOW_SCALING_* in <window.h>. */
103 int32_t scalingMode;
104 /** A set of flags from NATIVE_WINDOW_TRANSFORM_* in <window.h>. */
105 uint32_t transform;
106 /** The sticky transform set in Surface (only used by the LEGACY camera
107 * mode). */
108 uint32_t stickyTransform;
109 /** A fence that the consumer must wait on before reading the buffer;
110 * set this to Fence::NO_FENCE if the buffer is ready immediately. */
111 Fence fence;
112 Region surfaceDamage;
113 /** Whether or not the latest frame timestamps should be retrieved from
114 * the consumer. */
115 bool getFrameTimestamps;
116 };
117
118 struct QueueBufferOutput {
119 uint32_t width;
120 uint32_t height;
121 uint32_t transformHint;
122 uint32_t numPendingBuffers;
123 uint64_t nextFrameNumber;
Pawin Vongmasa761622e2017-02-06 18:22:40 -0800124 bool bufferReplaced;
Pawin Vongmasa120c4da2016-12-19 14:49:56 +0700125 FrameEventHistoryDelta frameTimestamps;
126 };
127
128 /**
129 * requestBuffer requests a new buffer for the given index. The server (i.e.
130 * the IOmxBufferProducer implementation) assigns the newly created
131 * buffer to the given slot index, and the client is expected to mirror the
132 * slot->buffer mapping so that it's not necessary to transfer an
133 * AnwBuffer for every dequeue operation.
134 *
135 * The slot must be in the range of [0, NUM_BUFFER_SLOTS).
136 *
137 * Return of a value other than NO_ERROR means an error has occurred:
138 * * NO_INIT - the buffer queue has been abandoned or the producer is not
139 * connected.
140 * * BAD_VALUE - one of the two conditions occurred:
141 * * slot was out of range (see above)
142 * * buffer specified by the slot is not dequeued
143 */
144 requestBuffer(
145 int32_t slot
146 ) generates (
147 Status status,
148 AnwBuffer buffer
149 );
150
151 /**
152 * setMaxDequeuedBufferCount sets the maximum number of buffers that can be
153 * dequeued by the producer at one time. If this method succeeds, any new
154 * buffer slots will be both unallocated and owned by the BufferQueue object
155 * (i.e. they are not owned by the producer or consumer). Calling this may
156 * also cause some buffer slots to be emptied. If the caller is caching the
157 * contents of the buffer slots, it should empty that cache after calling
158 * this method.
159 *
160 * This function should not be called with a value of maxDequeuedBuffers
161 * that is less than the number of currently dequeued buffer slots. Doing so
162 * will result in a BAD_VALUE error.
163 *
164 * The buffer count should be at least 1 (inclusive), but at most
165 * (NUM_BUFFER_SLOTS - the minimum undequeued buffer count) (exclusive). The
166 * minimum undequeued buffer count can be obtained by calling
167 * query(NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS).
168 *
169 * Return of a value other than NO_ERROR means an error has occurred:
170 * * NO_INIT - the buffer queue has been abandoned.
171 * * BAD_VALUE - one of the below conditions occurred:
172 * * bufferCount was out of range (see above).
173 * * client would have more than the requested number of dequeued
174 * buffers after this call.
175 * * this call would cause the maxBufferCount value to be exceeded.
176 * * failure to adjust the number of available slots.
177 */
178 setMaxDequeuedBufferCount(
179 int32_t maxDequeuedBuffers
180 ) generates (
181 Status status
182 );
183
184 /**
185 * Set the async flag if the producer intends to asynchronously queue
186 * buffers without blocking. Typically this is used for triple-buffering
187 * and/or when the swap interval is set to zero.
188 *
189 * Enabling async mode will internally allocate an additional buffer to
190 * allow for the asynchronous behavior. If it is not enabled queue/dequeue
191 * calls may block.
192 *
193 * Return of a value other than NO_ERROR means an error has occurred:
194 * * NO_INIT - the buffer queue has been abandoned.
195 * * BAD_VALUE - one of the following has occurred:
196 * * this call would cause the maxBufferCount value to be
197 * exceeded
198 * * failure to adjust the number of available slots.
199 */
200 setAsyncMode(
201 bool async
202 ) generates (
203 Status status
204 );
205
206 /**
207 * dequeueBuffer requests a new buffer slot for the client to use. Ownership
208 * of the slot is transfered to the client, meaning that the server will not
209 * use the contents of the buffer associated with that slot.
210 *
211 * The slot index returned may or may not contain a buffer (client-side).
212 * If the slot is empty the client should call requestBuffer to assign a new
213 * buffer to that slot.
214 *
215 * Once the client is done filling this buffer, it is expected to transfer
216 * buffer ownership back to the server with either cancelBuffer on
217 * the dequeued slot or to fill in the contents of its associated buffer
218 * contents and call queueBuffer.
219 *
220 * If dequeueBuffer returns the BUFFER_NEEDS_REALLOCATION flag, the client is
221 * expected to call requestBuffer immediately.
222 *
223 * If dequeueBuffer returns the RELEASE_ALL_BUFFERS flag, the client is
224 * expected to release all of the mirrored slot->buffer mappings.
225 *
226 * The fence parameter will be updated to hold the fence associated with
227 * the buffer. The contents of the buffer must not be overwritten until the
228 * fence signals. If the fence is Fence::NO_FENCE, the buffer may be written
229 * immediately.
230 *
231 * The width and height parameters must be no greater than the minimum of
232 * GL_MAX_VIEWPORT_DIMS and GL_MAX_TEXTURE_SIZE (see: glGetIntegerv).
233 * An error due to invalid dimensions might not be reported until
234 * updateTexImage() is called. If width and height are both zero, the
235 * default values specified by setDefaultBufferSize() are used instead.
236 *
237 * If the format is 0, the default format will be used.
238 *
239 * The usage argument specifies gralloc buffer usage flags. The values
240 * are enumerated in <gralloc.h>, e.g. GRALLOC_USAGE_HW_RENDER. These
241 * will be merged with the usage flags specified by
242 * IGraphicBufferConsumer::setConsumerUsageBits.
243 *
244 * This call will block until a buffer is available to be dequeued. If
245 * both the producer and consumer are controlled by the app, then this call
246 * can never block and will return WOULD_BLOCK if no buffer is available.
247 *
248 * A non-negative value with flags set (see above) will be returned upon
249 * success as status.
250 *
251 * Return of a negative means an error has occurred:
252 * * NO_INIT - the buffer queue has been abandoned or the producer is not
253 * connected.
254 * * BAD_VALUE - both in async mode and buffer count was less than the
255 * max numbers of buffers that can be allocated at once.
256 * * INVALID_OPERATION - cannot attach the buffer because it would cause
257 * too many buffers to be dequeued, either because
258 * the producer already has a single buffer dequeued
259 * and did not set a buffer count, or because a
260 * buffer count was set and this call would cause
261 * it to be exceeded.
262 * * WOULD_BLOCK - no buffer is currently available, and blocking is disabled
263 * since both the producer/consumer are controlled by app
264 * * NO_MEMORY - out of memory, cannot allocate the graphics buffer.
265 * * TIMED_OUT - the timeout set by setDequeueTimeout was exceeded while
266 * waiting for a buffer to become available.
267 *
268 * All other negative values are an unknown error returned downstream
269 * from the graphics allocator (typically errno).
270 */
271 dequeueBuffer(
272 uint32_t width,
273 uint32_t height,
274 PixelFormat format,
275 uint32_t usage,
276 bool getFrameTimestamps
277 ) generates (
278 Status status,
279 int32_t slot,
280 Fence fence,
281 FrameEventHistoryDelta outTimestamps
282 );
283
284 /**
285 * detachBuffer attempts to remove all ownership of the buffer in the given
286 * slot from the buffer queue. If this call succeeds, the slot will be
287 * freed, and there will be no way to obtain the buffer from this interface.
288 * The freed slot will remain unallocated until either it is selected to
289 * hold a freshly allocated buffer in dequeueBuffer or a buffer is attached
290 * to the slot. The buffer must have already been dequeued, and the caller
291 * must already possesses the sp<AnwBuffer> (i.e., must have called
292 * requestBuffer).
293 *
294 * Return of a value other than NO_ERROR means an error has occurred:
295 * * NO_INIT - the buffer queue has been abandoned or the producer is not
296 * connected.
297 * * BAD_VALUE - the given slot number is invalid, either because it is
298 * out of the range [0, NUM_BUFFER_SLOTS), or because the slot
299 * it refers to is not currently dequeued and requested.
300 */
301 detachBuffer(
302 int32_t slot
303 ) generates (
304 Status status
305 );
306
307 /**
308 * detachNextBuffer is equivalent to calling dequeueBuffer, requestBuffer,
309 * and detachBuffer in sequence, except for two things:
310 *
311 * 1) It is unnecessary to know the dimensions, format, or usage of the
312 * next buffer.
313 * 2) It will not block, since if it cannot find an appropriate buffer to
314 * return, it will return an error instead.
315 *
316 * Only slots that are free but still contain an AnwBuffer will be
317 * considered, and the oldest of those will be returned. buffer is
318 * equivalent to buffer from the requestBuffer call, and fence is
319 * equivalent to fence from the dequeueBuffer call.
320 *
321 * Return of a value other than NO_ERROR means an error has occurred:
322 * * NO_INIT - the buffer queue has been abandoned or the producer is not
323 * connected.
324 * * BAD_VALUE - either outBuffer or outFence were NULL.
325 * * NO_MEMORY - no slots were found that were both free and contained a
326 * AnwBuffer.
327 */
328 detachNextBuffer(
329 ) generates (
330 Status status,
331 AnwBuffer buffer,
332 Fence fence
333 );
334
335 /**
336 * attachBuffer attempts to transfer ownership of a buffer to the buffer
337 * queue. If this call succeeds, it will be as if this buffer was dequeued
338 * from the returned slot number. As such, this call will fail if attaching
339 * this buffer would cause too many buffers to be simultaneously dequeued.
340 *
341 * If attachBuffer returns the RELEASE_ALL_BUFFERS flag, the caller is
342 * expected to release all of the mirrored slot->buffer mappings.
343 *
344 * A non-negative value with flags set (see above) will be returned upon
345 * success.
346 *
347 * Return of a negative value means an error has occurred:
348 * * NO_INIT - the buffer queue has been abandoned or the producer is not
349 * connected.
350 * * BAD_VALUE - outSlot or buffer were NULL, invalid combination of
351 * async mode and buffer count override, or the generation
352 * number of the buffer did not match the buffer queue.
353 * * INVALID_OPERATION - cannot attach the buffer because it would cause
354 * too many buffers to be dequeued, either because
355 * the producer already has a single buffer dequeued
356 * and did not set a buffer count, or because a
357 * buffer count was set and this call would cause
358 * it to be exceeded.
359 * * WOULD_BLOCK - no buffer slot is currently available, and blocking is
360 * disabled since both the producer/consumer are
361 * controlled by the app.
362 * * TIMED_OUT - the timeout set by setDequeueTimeout was exceeded while
363 * waiting for a slot to become available.
364 */
365 attachBuffer(
366 AnwBuffer buffer
367 ) generates (
368 Status status,
369 int32_t slot
370 );
371
372 /**
373 * queueBuffer indicates that the client has finished filling in the
374 * contents of the buffer associated with slot and transfers ownership of
375 * that slot back to the server.
376 *
377 * It is not valid to call queueBuffer on a slot that is not owned
378 * by the client or one for which a buffer associated via requestBuffer
379 * (an attempt to do so will fail with a return value of BAD_VALUE).
380 *
381 * In addition, the input must be described by the client (as documented
382 * below). Any other properties (zero point, etc)
383 * are client-dependent, and should be documented by the client.
384 *
385 * The slot must be in the range of [0, NUM_BUFFER_SLOTS).
386 *
387 * Upon success, the output will be filled with meaningful values
388 * (refer to the documentation below).
389 *
390 * Return of a value other than NO_ERROR means an error has occurred:
391 * * NO_INIT - the buffer queue has been abandoned or the producer is not
392 * connected.
393 * * BAD_VALUE - one of the below conditions occurred:
394 * * fence was NULL
395 * * scaling mode was unknown
396 * * both in async mode and buffer count was less than the
397 * max numbers of buffers that can be allocated at once
398 * * slot index was out of range (see above).
399 * * the slot was not in the dequeued state
400 * * the slot was enqueued without requesting a buffer
401 * * crop rect is out of bounds of the buffer dimensions
402 */
403 queueBuffer(
404 int32_t slot,
405 QueueBufferInput input
406 ) generates (
407 Status status,
408 QueueBufferOutput output
409 );
410
411 /**
412 * cancelBuffer indicates that the client does not wish to fill in the
413 * buffer associated with slot and transfers ownership of the slot back to
414 * the server.
415 *
416 * The buffer is not queued for use by the consumer.
417 *
418 * The slot must be in the range of [0, NUM_BUFFER_SLOTS).
419 *
420 * The buffer will not be overwritten until the fence signals. The fence
421 * will usually be the one obtained from dequeueBuffer.
422 *
423 * Return of a value other than NO_ERROR means an error has occurred:
424 * * NO_INIT - the buffer queue has been abandoned or the producer is not
425 * connected.
426 * * BAD_VALUE - one of the below conditions occurred:
427 * * fence was NULL
428 * * slot index was out of range (see above).
429 * * the slot was not in the dequeued state
430 */
431 cancelBuffer(
432 int32_t slot,
433 Fence fence
434 ) generates (
435 Status status
436 );
437
438 /**
439 * query retrieves some information for this surface
440 * 'what' tokens allowed are that of NATIVE_WINDOW_* in <window.h>
441 *
442 * Return of a value other than NO_ERROR means an error has occurred:
443 * * NO_INIT - the buffer queue has been abandoned.
444 * * BAD_VALUE - what was out of range
445 */
446 query(
447 int32_t what
448 ) generates (
449 int32_t result,
450 int32_t value
451 );
452
453 /**
454 * connect attempts to connect a client API to the IOmxBufferProducer.
455 * This must be called before any other IOmxBufferProducer methods are
456 * called except for getAllocator. A consumer must be already connected.
457 *
458 * This method will fail if the connect was previously called on the
459 * IOmxBufferProducer and no corresponding disconnect call was made.
460 *
461 * The listener is an optional binder callback object that can be used if
462 * the producer wants to be notified when the consumer releases a buffer
463 * back to the BufferQueue. It is also used to detect the death of the
464 * producer. If only the latter functionality is desired, there is a
465 * DummyProducerListener class in IProducerListener.h that can be used.
466 *
467 * The api should be one of the NATIVE_WINDOW_API_* values in <window.h>
468 *
469 * The producerControlledByApp should be set to true if the producer is hosted
470 * by an untrusted process (typically app_process-forked processes). If both
471 * the producer and the consumer are app-controlled then all buffer queues
472 * will operate in async mode regardless of the async flag.
473 *
474 * Upon success, the output will be filled with meaningful data
475 * (refer to QueueBufferOutput documentation above).
476 *
477 * Return of a value other than NO_ERROR means an error has occurred:
478 * * NO_INIT - one of the following occurred:
479 * * the buffer queue was abandoned
480 * * no consumer has yet connected
481 * * BAD_VALUE - one of the following has occurred:
482 * * the producer is already connected
483 * * api was out of range (see above).
484 * * output was NULL.
485 * * Failure to adjust the number of available slots. This can
486 * happen because of trying to allocate/deallocate the async
487 * buffer in response to the value of producerControlledByApp.
488 * * DEAD_OBJECT - the token is hosted by an already-dead process
489 *
490 * Additional negative errors may be returned by the internals, they
491 * should be treated as opaque fatal unrecoverable errors.
492 */
493 connect(
494 IOmxProducerListener listener,
495 int32_t api,
496 bool producerControlledByApp
497 ) generates (
498 Status status,
499 QueueBufferOutput output
500 );
501
502 /**
503 * disconnect attempts to disconnect a client API from the
504 * IOmxBufferProducer. Calling this method will cause any subsequent
505 * calls to other IOmxBufferProducer methods to fail except for
506 * getAllocator and connect. Successfully calling connect after this will
507 * allow the other methods to succeed again.
508 *
509 * The api should be one of the NATIVE_WINDOW_API_* values in <window.h>
510 *
511 * Alternatively if mode is AllLocal, then the API value is ignored, and any API
512 * connected from the same PID calling disconnect will be disconnected.
513 *
514 * Disconnecting from an abandoned IOmxBufferProducer is legal and
515 * is considered a no-op.
516 *
517 * Return of a value other than NO_ERROR means an error has occurred:
518 * * BAD_VALUE - one of the following has occurred:
519 * * the api specified does not match the one that was connected
520 * * api was out of range (see above).
521 * * DEAD_OBJECT - the token is hosted by an already-dead process
522 */
523 disconnect(
524 int32_t api,
525 DisconnectMode mode /* = DisconnectMode::API */
526 ) generates (
527 Status status
528 );
529
530 /**
531 * Attaches a sideband buffer stream to the IOmxBufferProducer.
532 *
533 * A sideband stream is a device-specific mechanism for passing buffers
534 * from the producer to the consumer without using dequeueBuffer/
535 * queueBuffer. If a sideband stream is present, the consumer can choose
536 * whether to acquire buffers from the sideband stream or from the queued
537 * buffers.
538 *
539 * Passing NULL or a different stream handle will detach the previous
540 * handle if any.
541 */
542 setSidebandStream(
543 handle stream
544 ) generates (
545 Status status
546 );
547
548 /**
549 * Allocates buffers based on the given dimensions/format.
550 *
551 * This function will allocate up to the maximum number of buffers
552 * permitted by the current BufferQueue configuration. It will use the
553 * given format, dimensions, and usage bits, which are interpreted in the
554 * same way as for dequeueBuffer, and the async flag must be set the same
555 * way as for dequeueBuffer to ensure that the correct number of buffers are
556 * allocated. This is most useful to avoid an allocation delay during
557 * dequeueBuffer. If there are already the maximum number of buffers
558 * allocated, this function has no effect.
559 */
560 allocateBuffers(
561 uint32_t width,
562 uint32_t height,
563 PixelFormat format,
564 uint32_t usage
565 );
566
567 /**
568 * Sets whether dequeueBuffer is allowed to allocate new buffers.
569 *
570 * Normally dequeueBuffer does not discriminate between free slots which
571 * already have an allocated buffer and those which do not, and will
572 * allocate a new buffer if the slot doesn't have a buffer or if the slot's
573 * buffer doesn't match the requested size, format, or usage. This method
574 * allows the producer to restrict the eligible slots to those which already
575 * have an allocated buffer of the correct size, format, and usage. If no
576 * eligible slot is available, dequeueBuffer will block or return an error
577 * as usual.
578 */
579 allowAllocation(
580 bool allow
581 ) generates (
582 Status status
583 );
584
585 /**
586 * Sets the current generation number of the BufferQueue.
587 *
588 * This generation number will be inserted into any buffers allocated by the
589 * BufferQueue, and any attempts to attach a buffer with a different
590 * generation number will fail. Buffers already in the queue are not
591 * affected and will retain their current generation number. The generation
592 * number defaults to 0.
593 */
594 setGenerationNumber(
595 uint32_t generationNumber
596 ) generates (
597 Status status
598 );
599
600 /**
601 * Returns the name of the connected consumer.
602 */
603 getConsumerName(
604 ) generates (
605 string name
606 );
607
608 /**
609 * Used to enable/disable shared buffer mode.
610 *
611 * When shared buffer mode is enabled the first buffer that is queued or
612 * dequeued will be cached and returned to all subsequent calls to
613 * dequeueBuffer and acquireBuffer. This allows the producer and consumer to
614 * simultaneously access the same buffer.
615 */
616 setSharedBufferMode(
617 bool sharedBufferMode
618 ) generates (
619 Status status
620 );
621
622 /**
623 * Used to enable/disable auto-refresh.
624 *
625 * Auto refresh has no effect outside of shared buffer mode. In shared
626 * buffer mode, when enabled, it indicates to the consumer that it should
627 * attempt to acquire buffers even if it is not aware of any being
628 * available.
629 */
630 setAutoRefresh(
631 bool autoRefresh
632 ) generates (
633 Status status
634 );
635
636 /**
637 * Sets how long dequeueBuffer will wait for a buffer to become available
638 * before returning an error (TIMED_OUT).
639 *
640 * This timeout also affects the attachBuffer call, which will block if
641 * there is not a free slot available into which the attached buffer can be
642 * placed.
643 *
644 * By default, the BufferQueue will wait forever, which is indicated by a
645 * timeout of -1. If set (to a value other than -1), this will disable
646 * non-blocking mode and its corresponding spare buffer (which is used to
647 * ensure a buffer is always available).
648 *
649 * Return of a value other than NO_ERROR means an error has occurred:
650 * * BAD_VALUE - Failure to adjust the number of available slots. This can
651 * happen because of trying to allocate/deallocate the async
652 * buffer.
653 */
654 setDequeueTimeout(
655 int64_t timeoutNs
656 ) generates (
657 Status status
658 );
659
660 /**
661 * Returns the last queued buffer along with a fence which must signal
662 * before the contents of the buffer are read. If there are no buffers in
663 * the queue, buffer.nativeHandle and fence will be null handles.
664 *
665 * transformMatrix is meaningless if buffer.nativeHandle is null.
666 */
667 getLastQueuedBuffer(
668 ) generates (
669 Status status,
670 AnwBuffer buffer,
671 Fence fence,
672 float[16] transformMatrix
673 );
674
675 /**
676 * Gets the frame events that haven't already been retrieved.
677 */
678 getFrameTimestamps(
679 ) generates (
680 FrameEventHistoryDelta timeStamps
681 );
682
683 /**
684 * Returns a unique id for this BufferQueue.
685 */
686 getUniqueId(
687 ) generates (
688 Status status,
689 uint64_t outId
690 );
691
692};
693
694