/**@class android.hardware.HardwareBuffer implements android.os.Parcelable implements java.lang.AutoCloseable @extends java.lang.Object HardwareBuffer wraps a native <code>AHardwareBuffer</code> object, which is a low-level object representing a memory buffer accessible by various hardware units. HardwareBuffer allows sharing buffers across different application processes. In particular, HardwareBuffers may be mappable to memory accessibly to various hardware systems, such as the GPU, a sensor or context hub, or other auxiliary processing units. For more information, see the NDK documentation for <code>AHardwareBuffer</code>. */ var HardwareBuffer = { /***/ RGBA_8888 : "1", /**Format: 8 bits each red, green, blue, alpha, alpha is always 0xFF */ RGBX_8888 : "2", /**Format: 8 bits each red, green, blue, no alpha */ RGB_888 : "3", /**Format: 5 bits each red and blue, 6 bits green, no alpha */ RGB_565 : "4", /**Format: 16 bits each red, green, blue, alpha */ RGBA_FP16 : "22", /**Format: 10 bits each red, green, blue, 2 bits alpha */ RGBA_1010102 : "43", /**Format: opaque format used for raw data transfer; must have a height of 1 */ BLOB : "33", /**Format: 16 bits depth */ D_16 : "48", /**Format: 24 bits depth */ D_24 : "49", /**Format: 24 bits depth, 8 bits stencil */ DS_24UI8 : "50", /**Format: 32 bits depth */ D_FP32 : "51", /**Format: 32 bits depth, 8 bits stencil */ DS_FP32UI8 : "52", /**Format: 8 bits stencil */ S_UI8 : "53", /***/ USAGE_CPU_READ_RARELY : "2", /**Usage: The buffer will often be read by the CPU */ USAGE_CPU_READ_OFTEN : "3", /**Usage: The buffer will sometimes be written to by the CPU */ USAGE_CPU_WRITE_RARELY : "32", /**Usage: The buffer will often be written to by the CPU */ USAGE_CPU_WRITE_OFTEN : "48", /**Usage: The buffer will be read from by the GPU */ USAGE_GPU_SAMPLED_IMAGE : "256", /**Usage: The buffer will be written to by the GPU */ USAGE_GPU_COLOR_OUTPUT : "512", /**Usage: The buffer must not be used outside of a protected hardware path */ USAGE_PROTECTED_CONTENT : "16384", /**Usage: The buffer will be read by a hardware video encoder */ USAGE_VIDEO_ENCODE : "65536", /**Usage: The buffer will be used for sensor direct data */ USAGE_SENSOR_DIRECT_DATA : "8388608", /**Usage: The buffer will be used as a shader storage or uniform buffer object */ USAGE_GPU_DATA_BUFFER : "16777216", /**Usage: The buffer will be used as a cube map texture */ USAGE_GPU_CUBE_MAP : "33554432", /**Usage: The buffer contains a complete mipmap hierarchy */ USAGE_GPU_MIPMAP_COMPLETE : "67108864", /***/ CREATOR : "null", /**Creates a new <code>HardwareBuffer</code> instance. <p>Calling this method will throw an <code>IllegalStateException</code> if format is not a supported Format type.</p> @param {Number} width The width in pixels of the buffer @param {Number} height The height in pixels of the buffer @param {Number} format The @Format of each pixel @param {Number} layers The number of layers in the buffer @param {Number} usage The @Usage flags describing how the buffer will be used @return {Object {android.hardware.HardwareBuffer}} A <code>HardwareBuffer</code> instance if successful, or throws an IllegalArgumentException if the dimensions passed are invalid (either zero, negative, or too large to allocate), if the format is not supported, if the requested number of layers is less than one or not supported, or if the passed usage flags are not a supported set. */ create : function( ) {}, /**Queries whether the given buffer description is supported by the system. If this returns true, then the allocation may succeed until resource exhaustion occurs. If this returns false then this combination will never succeed. @param {Number} width The width in pixels of the buffer @param {Number} height The height in pixels of the buffer @param {Number} format The @Format of each pixel @param {Number} layers The number of layers in the buffer @param {Number} usage The @Usage flags describing how the buffer will be used @return {Boolean} True if the combination is supported, false otherwise. */ isSupported : function( ) {}, /** @param {Object {GraphicBuffer}} graphicBuffer A GraphicBuffer to be wrapped as HardwareBuffer @param graphicBuffer A GraphicBuffer to be wrapped as HardwareBuffer @return {Object {android.hardware.HardwareBuffer}} A <code>HardwareBuffer</code> instance. */ createFromGraphicBuffer : function( ) {}, /**Returns the width of this buffer in pixels. */ getWidth : function( ) {}, /**Returns the height of this buffer in pixels. */ getHeight : function( ) {}, /**Returns the @Format of this buffer. */ getFormat : function( ) {}, /**Returns the number of layers in this buffer. */ getLayers : function( ) {}, /**Returns the usage flags of the usage hints set on this buffer. */ getUsage : function( ) {}, /** @removed replaced by {@link #close()} */ destroy : function( ) {}, /** @removed replaced by {@link #isClosed()} */ isDestroyed : function( ) {}, /**Destroys this buffer immediately. Calling this method frees up any underlying native resources. After calling this method, this buffer must not be used in any way. @see #isClosed() */ close : function( ) {}, /**Indicates whether this buffer has been closed. A closed buffer cannot be used in any way: the buffer cannot be written to a parcel, etc. @return {Boolean} True if this <code>HardwareBuffer</code> is in a closed state, false otherwise. @see #close() */ isClosed : function( ) {}, /** */ describeContents : function( ) {}, /**Flatten this object in to a Parcel. <p>Calling this method will throw an <code>IllegalStateException</code> if {@link #close}() has been previously called.</p> @param {Object {Parcel}} dest The Parcel in which the object should be written. @param {Number} flags Additional flags about how the object should be written. May be 0 or {@link #PARCELABLE_WRITE_RETURN_VALUE}. */ writeToParcel : function( ) {}, };