Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c044abcb authored by Jerome Gaillard's avatar Jerome Gaillard
Browse files

Do not use AIDL Dataspace in Color.cpp

Instead this uses the "HAL_DATASPACE" version of DISPLAY_BT2020 which is
available on all platforms and avoids the need to add custom code for
host builds.

Flag: com.android.graphics.flags.display_bt2020_colorspace
Bug: 74062470
Test: m libhwui on host
Change-Id: I664992395ab1d9985b4fbe0867f1535503868e4c
parent 542a0e36
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
#include "Color.h"

#include <Properties.h>
#include <aidl/android/hardware/graphics/common/Dataspace.h>
#include <android/hardware_buffer.h>
#include <android/native_window.h>
#include <ui/ColorSpace.h>
@@ -222,8 +221,7 @@ android_dataspace ColorSpaceToADataSpace(SkColorSpace* colorSpace, SkColorType c
        if (nearlyEqual(fn, SkNamedTransferFn::kRec2020)) {
            return HAL_DATASPACE_BT2020;
        } else if (nearlyEqual(fn, SkNamedTransferFn::kSRGB)) {
            return static_cast<android_dataspace>(
                    ::aidl::android::hardware::graphics::common::Dataspace::DISPLAY_BT2020);
            return static_cast<android_dataspace>(HAL_DATASPACE_DISPLAY_BT2020);
        }
    }