diff options
4 files changed, 13 insertions, 16 deletions
diff --git a/libs/ui/include/ui/GraphicTypes.h b/libs/ui/include/ui/GraphicTypes.h index 4b03e44978..fb3c5f8eca 100644 --- a/libs/ui/include/ui/GraphicTypes.h +++ b/libs/ui/include/ui/GraphicTypes.h @@ -25,11 +25,11 @@ namespace android { namespace ui { +using android::hardware::graphics::common::V1_1::PixelFormat; using android::hardware::graphics::common::V1_1::RenderIntent; using android::hardware::graphics::common::V1_2::ColorMode; using android::hardware::graphics::common::V1_2::Dataspace; using android::hardware::graphics::common::V1_2::Hdr; -using android::hardware::graphics::common::V1_2::PixelFormat; } // namespace ui } // namespace android diff --git a/services/surfaceflinger/DisplayHardware/ComposerHal.cpp b/services/surfaceflinger/DisplayHardware/ComposerHal.cpp index 8343e5ab91..03eafd51b2 100644 --- a/services/surfaceflinger/DisplayHardware/ComposerHal.cpp +++ b/services/surfaceflinger/DisplayHardware/ComposerHal.cpp @@ -260,20 +260,17 @@ Error Composer::createVirtualDisplay(uint32_t width, uint32_t height, const uint32_t bufferSlotCount = 1; Error error = kDefaultError; if (mClient_2_2) { - mClient_2_2->createVirtualDisplay_2_2(width, height, - static_cast<types::V1_1::PixelFormat>(*format), - bufferSlotCount, - [&](const auto& tmpError, const auto& tmpDisplay, - const auto& tmpFormat) { - error = tmpError; - if (error != Error::NONE) { - return; - } + mClient_2_2->createVirtualDisplay_2_2(width, height, *format, bufferSlotCount, + [&](const auto& tmpError, const auto& tmpDisplay, + const auto& tmpFormat) { + error = tmpError; + if (error != Error::NONE) { + return; + } - *outDisplay = tmpDisplay; - *format = static_cast<types::V1_2::PixelFormat>( - tmpFormat); - }); + *outDisplay = tmpDisplay; + *format = tmpFormat; + }); } else { mClient->createVirtualDisplay(width, height, static_cast<types::V1_0::PixelFormat>(*format), bufferSlotCount, diff --git a/services/surfaceflinger/DisplayHardware/ComposerHal.h b/services/surfaceflinger/DisplayHardware/ComposerHal.h index 542e840251..ba3d2a6adc 100644 --- a/services/surfaceflinger/DisplayHardware/ComposerHal.h +++ b/services/surfaceflinger/DisplayHardware/ComposerHal.h @@ -48,11 +48,11 @@ namespace V2_3 = hardware::graphics::composer::V2_3; using types::V1_0::ColorTransform; using types::V1_0::Transform; +using types::V1_1::PixelFormat; using types::V1_1::RenderIntent; using types::V1_2::ColorMode; using types::V1_2::Dataspace; using types::V1_2::Hdr; -using types::V1_2::PixelFormat; using V2_1::Config; using V2_1::Display; diff --git a/services/surfaceflinger/tests/unittests/mock/DisplayHardware/MockComposer.h b/services/surfaceflinger/tests/unittests/mock/DisplayHardware/MockComposer.h index e6f1a0652d..551fae714b 100644 --- a/services/surfaceflinger/tests/unittests/mock/DisplayHardware/MockComposer.h +++ b/services/surfaceflinger/tests/unittests/mock/DisplayHardware/MockComposer.h @@ -29,11 +29,11 @@ namespace mock { using android::hardware::graphics::common::V1_0::ColorTransform; using android::hardware::graphics::common::V1_0::Transform; +using android::hardware::graphics::common::V1_1::PixelFormat; using android::hardware::graphics::common::V1_1::RenderIntent; using android::hardware::graphics::common::V1_2::ColorMode; using android::hardware::graphics::common::V1_2::Dataspace; using android::hardware::graphics::common::V1_2::Hdr; -using android::hardware::graphics::common::V1_2::PixelFormat; using android::hardware::graphics::composer::V2_1::Config; using android::hardware::graphics::composer::V2_1::Display; |