summaryrefslogtreecommitdiff
path: root/libs/gui/LayerState.cpp
diff options
context:
space:
mode:
author Peiyong Lin <lpy@google.com> 2019-03-01 15:00:23 -0800
committer Peiyong Lin <lpy@google.com> 2019-03-04 10:47:53 -0800
commitc502cb751508dd2008ee5e0601d4aae31cbaf6ca (patch)
tree3178c4ae249d49189a8e731aafed509ac8d49331 /libs/gui/LayerState.cpp
parentcb20ccaa611fbde0fcbade5a0b667d183c405b4f (diff)
[SurfaceFlinger] Add setColorSpaceAgnostic API.
Some layers, for example ScreenDecorOverlay*, only carry black, white or gray with some transpanrency, these values are special as they are color space agnostic. We don't need to do color conversion on them, instead we want to intercept the color space before we send to hardware composer for validation. This patch adds an API to allow this to happen. BUG: 126616348 Test: Build, flash and boot. Verify by calling in Letterbox. Change-Id: I62c9bf4feb320b466584a90df707c2b04213339c
Diffstat (limited to 'libs/gui/LayerState.cpp')
-rw-r--r--libs/gui/LayerState.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index 962d2630bc..84ba64494f 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -100,6 +100,7 @@ status_t layer_state_t::write(Parcel& output) const
output.writeFloat(bgColorAlpha);
output.writeUint32(static_cast<uint32_t>(bgColorDataspace));
+ output.writeBool(colorSpaceAgnostic);
return NO_ERROR;
}
@@ -177,6 +178,7 @@ status_t layer_state_t::read(const Parcel& input)
bgColorAlpha = input.readFloat();
bgColorDataspace = static_cast<ui::Dataspace>(input.readUint32());
+ colorSpaceAgnostic = input.readBool();
return NO_ERROR;
}