Partager via


SurfaceView.SetDesiredHdrHeadroom(Single) Method

Definition

Sets the desired amount of HDR headroom to be used when HDR content is presented on this SurfaceView.

[Android.Runtime.Register("setDesiredHdrHeadroom", "(F)V", "GetSetDesiredHdrHeadroom_FHandler", ApiSince=35)]
public virtual void SetDesiredHdrHeadroom (float desiredHeadroom);
[<Android.Runtime.Register("setDesiredHdrHeadroom", "(F)V", "GetSetDesiredHdrHeadroom_FHandler", ApiSince=35)>]
abstract member SetDesiredHdrHeadroom : single -> unit
override this.SetDesiredHdrHeadroom : single -> unit

Parameters

desiredHeadroom
Single

The amount of HDR headroom that is desired. Must be >= 1.0 (no HDR) and <= 10,000.0. Passing 0.0 will reset to the default, automatically chosen value.

Attributes

Remarks

Sets the desired amount of HDR headroom to be used when HDR content is presented on this SurfaceView.

By default the system will choose an amount of HDR headroom that is appropriate for the underlying device capabilities & bit-depth of the panel. However, for some types of content this can end up being more headroom than necessary or desired. An example would be a messaging app or gallery thumbnail view where some amount of HDR pop is desired without overly influencing the perceived brightness of the majority SDR content. This can also be used to animate in/out of an HDR range for smoother transitions.

Note: The actual amount of HDR headroom that will be given is subject to a variety of factors such as ambient conditions, display capabilities, or bit-depth limitations. See Display#getHdrSdrRatio() for more information as well as how to query the current value.

Java documentation for android.view.SurfaceView.setDesiredHdrHeadroom(float).

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.

Applies to