Combining background color related transactions/functions
Bug:122326454
Test: build, boot, SurfaceFlinger_test, ASurfaceControlTest cts test
Change-Id: I7ec9f2214c7422ab90ab56dd84daafd5b0bf720a
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index 6091d3f..206bc30 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -98,8 +98,8 @@
output.writeInt32(cachedBuffer.bufferId);
output.writeParcelable(metadata);
- output.writeFloat(colorAlpha);
- output.writeUint32(static_cast<uint32_t>(colorDataspace));
+ output.writeFloat(bgColorAlpha);
+ output.writeUint32(static_cast<uint32_t>(bgColorDataspace));
return NO_ERROR;
}
@@ -175,8 +175,8 @@
cachedBuffer.bufferId = input.readInt32();
input.readParcelable(&metadata);
- colorAlpha = input.readFloat();
- colorDataspace = static_cast<ui::Dataspace>(input.readUint32());
+ bgColorAlpha = input.readFloat();
+ bgColorDataspace = static_cast<ui::Dataspace>(input.readUint32());
return NO_ERROR;
}
@@ -390,13 +390,11 @@
what |= eCachedBufferChanged;
cachedBuffer = other.cachedBuffer;
}
- if (other.what & eColorAlphaChanged) {
- what |= eColorAlphaChanged;
- colorAlpha = other.colorAlpha;
- }
- if (other.what & eColorDataspaceChanged) {
- what |= eColorDataspaceChanged;
- colorDataspace = other.colorDataspace;
+ if (other.what & eBackgroundColorChanged) {
+ what |= eBackgroundColorChanged;
+ color = other.color;
+ bgColorAlpha = other.bgColorAlpha;
+ bgColorDataspace = other.bgColorDataspace;
}
if (other.what & eMetadataChanged) {
what |= eMetadataChanged;