Merge "Remove concept of nits from the client target properties" into tm-dev
This commit is contained in:
commit
ca18b9661b
5 changed files with 17 additions and 15 deletions
|
@ -33,8 +33,8 @@
|
|||
|
||||
package android.hardware.graphics.composer3;
|
||||
@VintfStability
|
||||
parcelable ClientTargetPropertyWithNits {
|
||||
parcelable ClientTargetPropertyWithBrightness {
|
||||
long display;
|
||||
android.hardware.graphics.composer3.ClientTargetProperty clientTargetProperty;
|
||||
float whitePointNits;
|
||||
float brightness;
|
||||
}
|
|
@ -40,5 +40,5 @@ union CommandResultPayload {
|
|||
android.hardware.graphics.composer3.PresentFence presentFence;
|
||||
android.hardware.graphics.composer3.ReleaseFences releaseFences;
|
||||
android.hardware.graphics.composer3.PresentOrValidate presentOrValidateResult;
|
||||
android.hardware.graphics.composer3.ClientTargetPropertyWithNits clientTargetProperty;
|
||||
android.hardware.graphics.composer3.ClientTargetPropertyWithBrightness clientTargetProperty;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ package android.hardware.graphics.composer3;
|
|||
import android.hardware.graphics.composer3.ClientTargetProperty;
|
||||
|
||||
@VintfStability
|
||||
parcelable ClientTargetPropertyWithNits {
|
||||
parcelable ClientTargetPropertyWithBrightness {
|
||||
/**
|
||||
* The display which this commands refers to.
|
||||
* @see IComposer.createDisplay
|
||||
|
@ -32,7 +32,7 @@ parcelable ClientTargetPropertyWithNits {
|
|||
ClientTargetProperty clientTargetProperty;
|
||||
|
||||
/**
|
||||
* The white points nits as described in CommandResultPayload.clientTargetProperty
|
||||
* The brightness as described in CommandResultPayload.clientTargetProperty
|
||||
*/
|
||||
float whitePointNits;
|
||||
float brightness;
|
||||
}
|
|
@ -17,7 +17,7 @@
|
|||
package android.hardware.graphics.composer3;
|
||||
|
||||
import android.hardware.graphics.composer3.ChangedCompositionTypes;
|
||||
import android.hardware.graphics.composer3.ClientTargetPropertyWithNits;
|
||||
import android.hardware.graphics.composer3.ClientTargetPropertyWithBrightness;
|
||||
import android.hardware.graphics.composer3.CommandError;
|
||||
import android.hardware.graphics.composer3.DisplayRequest;
|
||||
import android.hardware.graphics.composer3.PresentFence;
|
||||
|
@ -83,12 +83,13 @@ union CommandResultPayload {
|
|||
PresentOrValidate presentOrValidateResult;
|
||||
|
||||
/**
|
||||
* The white point parameter describes the intended white point of the client target buffer.
|
||||
* The brightness parameter describes the intended brightness space of the client target buffer.
|
||||
* The brightness is in the range [0, 1], where 1 is the current brightness of the display.
|
||||
* When client composition blends both HDR and SDR content, the client must composite to the
|
||||
* brightness space as specified by the hardware composer. This is so that adjusting the real
|
||||
* display brightness may be applied atomically with compensating the client target output. For
|
||||
* instance, client-compositing a list of SDR layers requires dimming the brightness space of
|
||||
* the SDR buffers when an HDR layer is simultaneously device-composited.
|
||||
*/
|
||||
ClientTargetPropertyWithNits clientTargetProperty;
|
||||
ClientTargetPropertyWithBrightness clientTargetProperty;
|
||||
}
|
||||
|
|
|
@ -153,14 +153,14 @@ class ComposerClientReader {
|
|||
}
|
||||
|
||||
// Get the client target properties requested by hardware composer.
|
||||
ClientTargetPropertyWithNits takeClientTargetProperty(int64_t display) {
|
||||
ClientTargetPropertyWithBrightness takeClientTargetProperty(int64_t display) {
|
||||
auto found = mReturnData.find(display);
|
||||
|
||||
// If not found, return the default values.
|
||||
if (found == mReturnData.end()) {
|
||||
return ClientTargetPropertyWithNits{
|
||||
return ClientTargetPropertyWithBrightness{
|
||||
.clientTargetProperty = {common::PixelFormat::RGBA_8888, Dataspace::UNKNOWN},
|
||||
.whitePointNits = -1.f,
|
||||
.brightness = 1.f,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -201,7 +201,8 @@ class ComposerClientReader {
|
|||
data.presentOrValidateState = std::move(presentOrValidate.result);
|
||||
}
|
||||
|
||||
void parseSetClientTargetProperty(const ClientTargetPropertyWithNits&& clientTargetProperty) {
|
||||
void parseSetClientTargetProperty(
|
||||
const ClientTargetPropertyWithBrightness&& clientTargetProperty) {
|
||||
auto& data = mReturnData[clientTargetProperty.display];
|
||||
data.clientTargetProperty = std::move(clientTargetProperty);
|
||||
}
|
||||
|
@ -213,9 +214,9 @@ class ComposerClientReader {
|
|||
std::vector<ReleaseFences::Layer> releasedLayers;
|
||||
PresentOrValidate::Result presentOrValidateState;
|
||||
|
||||
ClientTargetPropertyWithNits clientTargetProperty = {
|
||||
ClientTargetPropertyWithBrightness clientTargetProperty = {
|
||||
.clientTargetProperty = {common::PixelFormat::RGBA_8888, Dataspace::UNKNOWN},
|
||||
.whitePointNits = -1.f,
|
||||
.brightness = 1.f,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue