ImageWriter.Builder.SetUsage(Int64) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Set the usage flag of this ImageWriter.
[Android.Runtime.Register("setUsage", "(J)Landroid/media/ImageWriter$Builder;", "", ApiSince=33)]
public Android.Media.ImageWriter.Builder SetUsage(long usage);
[<Android.Runtime.Register("setUsage", "(J)Landroid/media/ImageWriter$Builder;", "", ApiSince=33)>]
member this.SetUsage : int64 -> Android.Media.ImageWriter.Builder
Parameters
- usage
- Int64
The intended usage of the images produced by this ImageWriter. Value is either 0 or a combination of the following: HardwareBuffer.USAGE_CPU_READ_RARELY HardwareBuffer.USAGE_CPU_READ_OFTEN HardwareBuffer.USAGE_CPU_WRITE_RARELY HardwareBuffer.USAGE_CPU_WRITE_OFTEN HardwareBuffer.USAGE_GPU_SAMPLED_IMAGE HardwareBuffer.USAGE_GPU_COLOR_OUTPUT HardwareBuffer.USAGE_COMPOSER_OVERLAY HardwareBuffer.USAGE_PROTECTED_CONTENT HardwareBuffer.USAGE_VIDEO_ENCODE HardwareBuffer.USAGE_GPU_DATA_BUFFER HardwareBuffer.USAGE_SENSOR_DIRECT_DATA HardwareBuffer.USAGE_GPU_CUBE_MAP HardwareBuffer.USAGE_GPU_MIPMAP_COMPLETE HardwareBuffer.USAGE_FRONT_BUFFER
Returns
the Builder instance with customized usage flag. This value cannot be null.
- Attributes
Remarks
Set the usage flag of this ImageWriter. If this function is not called, usage bit will be set to HardwareBuffer.USAGE_CPU_WRITE_OFTEN if the image format is not PRIVATE.
Android reference for android.media.ImageWriter.Builder.setUsage.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.