diff options
| author | 2020-10-06 18:05:25 -0700 | |
|---|---|---|
| committer | 2020-10-06 18:06:52 -0700 | |
| commit | cd26147cd28716e87f4c5bd6cd427431d1e5fc38 (patch) | |
| tree | 9ef950f23c2fb39c9db459c3fbf236d01b1776d4 /libs/gui/LayerState.cpp | |
| parent | b467d4870df3934a0daa24f1c15f4338495a65dd (diff) | |
Remove hard code color space.
In general when there's a color space involved, we must explicitly
specify instead of hard coding.
Bug: N/A
Test: atest SurfaceFlinger_unittest
Change-Id: I87c84990b4ec4bd815d7d552346c5fc8c7274135
Diffstat (limited to 'libs/gui/LayerState.cpp')
| -rw-r--r-- | libs/gui/LayerState.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index bde73bab2e..8594ab3bd5 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -592,19 +592,20 @@ status_t CaptureArgs::write(Parcel& output) const { SAFE_PARCEL(output.writeFloat, frameScale); SAFE_PARCEL(output.writeBool, captureSecureLayers); SAFE_PARCEL(output.writeInt32, uid); - SAFE_PARCEL(output.writeBool, useRGBColorSpace); + SAFE_PARCEL(output.writeInt32, static_cast<int32_t>(dataspace)); return NO_ERROR; } status_t CaptureArgs::read(const Parcel& input) { - int32_t format = 0; - SAFE_PARCEL(input.readInt32, &format); - pixelFormat = static_cast<ui::PixelFormat>(format); + int32_t value = 0; + SAFE_PARCEL(input.readInt32, &value); + pixelFormat = static_cast<ui::PixelFormat>(value); SAFE_PARCEL(input.read, sourceCrop); SAFE_PARCEL(input.readFloat, &frameScale); SAFE_PARCEL(input.readBool, &captureSecureLayers); SAFE_PARCEL(input.readInt32, &uid); - SAFE_PARCEL(input.readBool, &useRGBColorSpace); + SAFE_PARCEL(input.readInt32, &value); + dataspace = static_cast<ui::Dataspace>(value); return NO_ERROR; } |