Lines Matching +full:is +full:- +full:buffer
8 * http://www.apache.org/licenses/LICENSE-2.0
11 * distributed under the License is distributed on an "AS IS" BASIS,
35 /* If this capability is supported, then the outBuffers parameter to
37 * given allocation is possible or not. */
40 /* If this capability is supported, then the implementation supports
44 /* If this capability is supported, then the implementation always closes
45 * and deletes a buffer handle whenever the last reference is removed.
47 * Supporting this capability is strongly recommended. It will become
82 * dequeued buffer before. May be ignored by the gralloc device. */
92 /* Bits reserved for implementation-specific usage flags */
115 /* Bits reserved for implementation-specific usage flags */
195 /* The consumer must have a hardware-protected path to an external display
196 * sink for this buffer. If a hardware-protected path is not available, then
197 * do not attempt to display this buffer. */
214 /* Bits reserved for implementation-specific usage flags */
237 /* Bits reserved for implementation-specific usage flags */
281 * outCount - if outCapabilities was NULL, the number of capabilities
285 * outCapabilities - a list of capabilities supported by this device; may
298 * descriptor - the function to return
301 * or NULL if the described function is not supported by this device.
309 return module->methods->open(module, GRALLOC_HARDWARE_MODULE_ID, in gralloc1_open()
314 return device->common.close(&device->common); in gralloc1_close()
321 * Retrieves implementation-defined debug information, which will be displayed
336 * Any data written into outBuffer need not be null-terminated.
339 * outSize - if outBuffer was NULL, the number of bytes needed to copy the
342 * prior to the call; pointer will be non-NULL
343 * outBuffer - the buffer to write the dump output into; may be NULL as
344 * described above; data written into this buffer need not be
345 * null-terminated
351 * Buffer descriptor lifecycle functions
354 * this parameter is omitted from the described parameter lists.
361 * Creates a new, empty buffer descriptor.
364 * outDescriptor - the new buffer descriptor
367 * GRALLOC1_ERROR_NO_RESOURCES - no more descriptors can currently be created
376 * Destroys an existing buffer descriptor.
379 * descriptor - the buffer descriptor to destroy
382 * GRALLOC1_ERROR_BAD_DESCRIPTOR - descriptor does not refer to a valid
383 * buffer descriptor
389 * Buffer descriptor modification functions
392 * and a buffer descriptor, so these parameters are omitted from the described
400 * Sets the desired consumer usage flags of the buffer.
406 * usage - the desired consumer usage flags
409 * GRALLOC1_ERROR_BAD_DESCRIPTOR - the buffer descriptor is invalid
410 * GRALLOC1_ERROR_BAD_VALUE - an invalid usage flag was passed in
420 * Sets the desired width and height of the buffer in pixels.
423 * buffer, but does not necessarily represent the offset in columns between the
424 * same column in adjacent rows. If this offset is required, consult getStride
428 * buffer.
431 * width - the desired width in pixels
432 * height - the desired height in pixels
435 * GRALLOC1_ERROR_BAD_DESCRIPTOR - the buffer descriptor is invalid
445 * Sets the desired format of the buffer.
450 * format - the desired format
453 * GRALLOC1_ERROR_BAD_DESCRIPTOR - the buffer descriptor is invalid
454 * GRALLOC1_ERROR_BAD_VALUE - format is invalid
465 * Sets the number of layers in the buffer.
467 * A buffer with multiple layers may be used as the backing store of an array
468 * texture. All layers of a buffer share the same characteristics (e.g.,
474 * layerCount - the desired number of layers, must be non-zero
477 * GRALLOC1_ERROR_BAD_DESCRIPTOR - the buffer descriptor is invalid
478 * GRALLOC1_ERROR_BAD_VALUE - the layer count is invalid
488 * Sets the desired producer usage flags of the buffer.
494 * usage - the desired producer usage flags
497 * GRALLOC1_ERROR_BAD_DESCRIPTOR - the buffer descriptor is invalid
498 * GRALLOC1_ERROR_BAD_VALUE - an invalid usage flag was passed in
505 * Buffer handle query functions
508 * and a buffer handle, so these parameters are omitted from the described
512 * which means that the device is not able to retrieve the requested information
513 * from the buffer. This is necessary to enable a smooth transition from earlier
523 * Gets a value that uniquely identifies the backing store of the given buffer.
526 * function. If the buffer is present in more than one process, the backing
527 * store value for that buffer is not required to be the same in every process.
530 * outStore - the backing store identifier for this buffer
533 * GRALLOC1_ERROR_BAD_HANDLE - the buffer handle is invalid
534 * GRALLOC1_ERROR_UNSUPPORTED - the device is unable to retrieve the
535 * backing store identifier from the buffer; see note [1] in this
539 gralloc1_device_t* device, buffer_handle_t buffer,
546 * Gets the consumer usage flags which were used to allocate this buffer.
551 * outUsage - the consumer usage flags used to allocate this buffer; must be
552 * non-NULL
555 * GRALLOC1_ERROR_BAD_HANDLE - the buffer handle is invalid
556 * GRALLOC1_ERROR_UNSUPPORTED - the device is unable to retrieve the
557 * dimensions from the buffer; see note [1] in this section's header for
561 gralloc1_device_t* device, buffer_handle_t buffer,
568 * Gets the width and height of the buffer in pixels.
573 * outWidth - the width of the buffer in pixels, must be non-NULL
574 * outHeight - the height of the buffer in pixels, must be non-NULL
577 * GRALLOC1_ERROR_BAD_HANDLE - the buffer handle is invalid
578 * GRALLOC1_ERROR_UNSUPPORTED - the device is unable to retrieve the
579 * dimensions from the buffer; see note [1] in this section's header for
583 gralloc1_device_t* device, buffer_handle_t buffer, uint32_t* outWidth,
590 * Gets the format of the buffer.
596 * outFormat - the format of the buffer; must be non-NULL
599 * GRALLOC1_ERROR_BAD_HANDLE - the buffer handle is invalid
600 * GRALLOC1_ERROR_UNSUPPORTED - the device is unable to retrieve the format
601 * from the buffer; see note [1] in this section's header for more
613 * Gets the number of layers of the buffer.
618 * outLayerCount - the number of layers in the image, must be non-NULL
621 * GRALLOC1_ERROR_BAD_HANDLE - the buffer handle is invalid
622 * GRALLOC1_ERROR_UNSUPPORTED - the device is unable to retrieve the
623 * layer count from the buffer; see note [1] in this section's header for
627 gralloc1_device_t* device, buffer_handle_t buffer,
634 * Gets the producer usage flags which were used to allocate this buffer.
639 * outUsage - the producer usage flags used to allocate this buffer; must be
640 * non-NULL
643 * GRALLOC1_ERROR_BAD_HANDLE - the buffer handle is invalid
644 * GRALLOC1_ERROR_UNSUPPORTED - the device is unable to retrieve the usage
645 * from the buffer; see note [1] in this section's header for more
649 gralloc1_device_t* device, buffer_handle_t buffer,
656 * Gets the stride of the buffer in pixels.
658 * The stride is the offset in pixel-sized elements between the same column in
660 * buffer.
663 * outStride - the stride in pixels; must be non-NULL
666 * GRALLOC1_ERROR_BAD_HANDLE - the buffer handle is invalid
667 * GRALLOC1_ERROR_UNDEFINED - the notion of a stride is not meaningful for
669 * GRALLOC1_ERROR_UNSUPPORTED - the device is unable to retrieve the stride
674 gralloc1_device_t* device, buffer_handle_t buffer, uint32_t* outStride);
679 * Get the transport size of a buffer. An imported buffer handle is a raw
680 * buffer handle with the process-local runtime data appended. This
681 * function, for example, allows a caller to omit the process-local
682 * runtime data at the tail when serializing the imported buffer handle.
684 * Note that a client might or might not omit the process-local runtime
685 * data when sending an imported buffer handle. The mapper must support
689 * outNumFds - the number of file descriptors needed for transport
690 * outNumInts - the number of integers needed for transport
693 * GRALLOC1_ERROR_BAD_HANDLE - the buffer handle is invalid
694 * GRALLOC1_ERROR_UNSUPPORTED - the device is unable to retrieve the numFds
698 gralloc1_device_t* device, buffer_handle_t buffer, uint32_t *outNumFds,
713 * Validate that the buffer can be safely accessed by a caller who assumes
715 * that the buffer size is large enough. Validating the buffer against
716 * individual buffer attributes is optional.
719 * descriptor - specifies the attributes of the buffer
720 * stride - the buffer stride returned by IAllocator::allocate
723 * GRALLOC1_ERROR_BAD_HANDLE - the buffer handle is invalid
724 * GRALLOC1_ERROR_BAD_VALUE - when buffer cannot be safely accessed
725 * GRALLOC1_ERROR_UNSUPPORTED - the device is unable to validate the buffer
729 gralloc1_device_t* device, buffer_handle_t buffer,
734 * Buffer management functions
743 * Each buffer will correspond to one of the descriptors passed into the
744 * function. If the device is unable to share the backing store between the
746 * stores and return GRALLOC1_ERROR_NOT_SHARED if it is successful.
748 * If this call is successful, the client is responsible for freeing the
749 * buffer_handle_t using release() when it is finished with the buffer. It is
753 * If GRALLOC1_CAPABILITY_TEST_ALLOCATE is supported by this device, outBuffers
756 * allocation is possible (ignoring potential resource contention which might
763 * numDescriptors - the number of buffer descriptors, which must also be equal
765 * descriptors - the buffer descriptors to attempt to allocate
766 * outBuffers - the allocated buffers; must be non-NULL unless the device
768 * modified by the device if allocation is unsuccessful
771 * GRALLOC1_ERROR_BAD_DESCRIPTOR - one of the descriptors does not refer to a
772 * valid buffer descriptor
773 * GRALLOC1_ERROR_NOT_SHARED - allocation was successful, but required more
774 * than one backing store to satisfy all of the buffer descriptors
775 * GRALLOC1_ERROR_NO_RESOURCES - allocation failed because one or more of the
778 * GRALLOC1_ERROR_UNSUPPORTED - one or more of the descriptors can never be
788 * This function is optional for all gralloc1 devices.
792 * Explictly imports a buffer into a proccess.
794 * This function can be called in place of retain when a raw buffer handle is
796 * be used to access the underlying graphic buffer. The new import handle has a
805 * rawHandle - the raw buffer handle to import
806 * outBuffer - a handle to the newly imported buffer
809 * GRALLOC1_ERROR_BAD_HANDLE - the buffer handle is invalid
810 * GRALLOC1_ERROR_NO_RESOURCES - it is not possible to add a import to this
811 * buffer at this time
817 /* retain(..., buffer)
821 * Adds a reference to the given buffer.
823 * This function must be called when a buffer_handle_t is received from a remote
824 * process to prevent the buffer's data from being freed when the remote process
825 * releases the buffer. It may also be called to increase the reference count if
826 * two components in the same process want to interact with the buffer
830 * buffer - the buffer to which a reference should be added
833 * GRALLOC1_ERROR_BAD_HANDLE - the buffer handle is invalid
834 * GRALLOC1_ERROR_NO_RESOURCES - it is not possible to add a reference to this
835 * buffer at this time
838 gralloc1_device_t* device, buffer_handle_t buffer);
840 /* release(..., buffer)
844 * Removes a reference from the given buffer.
846 * If no references remain, the buffer should be freed. When the last buffer
847 * referring to a particular backing store is freed, that backing store should
850 * When GRALLOC1_CAPABILITY_RELEASE_IMPLY_DELETE is supported,
852 * implementation whenever the last reference is removed. Otherwise, a call
854 * by the caller when the buffer is not allocated locally through allocate().
857 * buffer - the buffer from which a reference should be removed
860 * GRALLOC1_ERROR_BAD_HANDLE - the buffer handle is invalid
863 gralloc1_device_t* device, buffer_handle_t buffer);
866 * Buffer access functions
869 * this parameter is omitted from the described parameter lists.
879 /* getNumFlexPlanes(..., buffer, outNumPlanes)
884 * given buffer. This may be used to efficiently allocate only as many plane
887 * If the given buffer cannot be locked as a flex format, this function may
891 * buffer - the buffers for which the number of planes should be queried
892 * outNumPlanes - the number of flex planes required to describe the given
893 * buffer; must be non-NULL
896 * GRALLOC1_ERROR_BAD_HANDLE - the buffer handle is invalid
897 * GRALLOC1_ERROR_UNSUPPORTED - the buffer's format cannot be represented in a
901 gralloc1_device_t* device, buffer_handle_t buffer,
904 /* lock(..., buffer, producerUsage, consumerUsage, accessRegion, outData,
909 * Locks the given buffer for the specified CPU usage.
912 * usage which is not *_USAGE_NONE must be one of the *_USAGE_CPU_* values, as
913 * applicable. Locking a buffer for a non-CPU usage is not supported.
915 * Locking the same buffer simultaneously from multiple threads is permitted,
916 * but if any of the threads attempt to lock the buffer for writing, the
917 * behavior is undefined, except that it must not cause process termination or
918 * block the client indefinitely. Leaving the buffer content in an indeterminate
921 * The client must not modify the content of the buffer outside of accessRegion,
922 * and the device need not guarantee that content outside of accessRegion is
924 * is undefined, except that it must not cause process termination.
926 * outData must be a non-NULL pointer, the contents of which which will be
927 * filled with a pointer to the locked buffer memory. This address will
928 * represent the top-left corner of the entire buffer, even if accessRegion does
929 * not begin at the top-left corner.
931 * acquireFence is a file descriptor referring to a acquire sync fence object,
932 * which will be signaled when it is safe for the device to access the contents
933 * of the buffer (prior to locking). If it is already safe to access the buffer
934 * contents, -1 may be passed instead.
937 * buffer - the buffer to lock
938 * producerUsage - the producer usage flags to request; either this or
941 * consumerUsage - the consumer usage flags to request; either this or
944 * accessRegion - the portion of the buffer that the client intends to access;
945 * must be non-NULL
946 * outData - will be filled with a CPU-accessible pointer to the buffer data;
947 * must be non-NULL
948 * acquireFence - a sync fence file descriptor as described above
951 * GRALLOC1_ERROR_BAD_HANDLE - the buffer handle is invalid
952 * GRALLOC1_ERROR_BAD_VALUE - neither or both of producerUsage and
955 * GRALLOC1_ERROR_NO_RESOURCES - the buffer cannot be locked at this time, but
957 * GRALLOC1_ERROR_UNSUPPORTED - the buffer cannot be locked with the given
961 gralloc1_device_t* device, buffer_handle_t buffer,
967 /* lockFlex(..., buffer, producerUsage, consumerUsage, accessRegion,
972 * This is largely the same as lock(), except that instead of returning a
973 * pointer directly to the buffer data, it returns an android_flex_layout
978 * multimedia codecs when they are configured with a flexible-YUV-compatible
982 * non-YUV formats, but if the buffer format is not compatible with a flexible
986 * buffer - the buffer to lock
987 * producerUsage - the producer usage flags to request; either this or
990 * consumerUsage - the consumer usage flags to request; either this or
993 * accessRegion - the portion of the buffer that the client intends to access;
994 * must be non-NULL
995 * outFlexLayout - will be filled with the description of the planes in the
996 * buffer
997 * acquireFence - a sync fence file descriptor as described in lock()
1000 * GRALLOC1_ERROR_BAD_HANDLE - the buffer handle is invalid
1001 * GRALLOC1_ERROR_BAD_VALUE - neither or both of producerUsage and
1004 * GRALLOC1_ERROR_NO_RESOURCES - the buffer cannot be locked at this time, but
1006 * GRALLOC1_ERROR_UNSUPPORTED - the buffer cannot be locked with the given
1010 gralloc1_device_t* device, buffer_handle_t buffer,
1016 /* unlock(..., buffer, releaseFence)
1021 * buffer when releaseFence signals.
1024 * sync fence object, which will be signaled when it is safe to access the
1025 * contents of the buffer (after the buffer has been unlocked). If it is already
1026 * safe to access the buffer contents, then -1 may be returned instead.
1028 * This function is used to unlock both buffers locked by lock() and those
1032 * buffer - the buffer to unlock
1033 * outReleaseFence - a sync fence file descriptor as described above
1036 * GRALLOC1_ERROR_BAD_HANDLE - the buffer handle is invalid
1039 gralloc1_device_t* device, buffer_handle_t buffer,