Loading libs/gui/SurfaceComposerClient.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -2739,6 +2739,7 @@ void SurfaceComposerClient::getDynamicDisplayInfoInternal(gui::DynamicDisplayInf outMode.sfVsyncOffset = mode.sfVsyncOffset; outMode.presentationDeadline = mode.presentationDeadline; outMode.group = mode.group; outMode.outputType = static_cast<ui::OutputType>(mode.outputType); std::transform(mode.supportedHdrTypes.begin(), mode.supportedHdrTypes.end(), std::back_inserter(outMode.supportedHdrTypes), [](const int32_t& value) { return static_cast<ui::Hdr>(value); }); Loading libs/gui/aidl/android/gui/DisplayMode.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -36,4 +36,5 @@ parcelable DisplayMode { long sfVsyncOffset = 0; long presentationDeadline = 0; int group = -1; int outputType = 0; } libs/ui/include/ui/DisplayMode.h +2 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <type_traits> #include <ui/GraphicTypes.h> #include <ui/OutputType.h> #include <ui/Size.h> #include <utils/Flattenable.h> #include <utils/Timers.h> Loading @@ -44,6 +45,7 @@ struct DisplayMode { nsecs_t sfVsyncOffset = 0; nsecs_t presentationDeadline = 0; int32_t group = -1; ui::OutputType outputType; }; } // namespace android::ui libs/ui/include/ui/OutputType.h 0 → 100644 +47 −0 Original line number Diff line number Diff line /* * Copyright 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef ANDROID_UI_OUTPUT_TYPE_H #define ANDROID_UI_OUTPUT_TYPE_H #include <stdint.h> namespace android::ui { // Must be kept in sync with composer3/OutputType.aidl enum class OutputType : int32_t { /** * Invalid HDR output type */ OUTPUT_TYPE_INVALID = 0, /* * Display output format will be chosen by the HAL implementation * and will not adjust to match the content format */ OUTPUT_TYPE_SYSTEM = 1, /** * Display supports SDR output type */ OUTPUT_TYPE_SDR = 2, /** * Display supports HDR10 output type */ OUTPUT_TYPE_HDR10 = 3, }; } // namespace android::ui #endif // ANDROID_UI_OUTPUT_TYPE_H services/surfaceflinger/DisplayHardware/DisplayMode.h +4 −4 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ namespace android { using aidl::android::hardware::graphics::composer3::OutputType; namespace composer3 = aidl::android::hardware::graphics::composer3; namespace hal = android::hardware::graphics::composer::hal; class DisplayMode; Loading Loading @@ -115,7 +115,7 @@ public: return *this; } Builder& setHdrOutputType(OutputType type) { Builder& setHdrOutputType(composer3::OutputType type) { mDisplayMode->mHdrOutputType = type; return *this; } Loading Loading @@ -172,7 +172,7 @@ public: // without visual interruptions such as a black screen. int32_t getGroup() const { return mGroup; } OutputType getHdrOutputType() const { return mHdrOutputType; } composer3::OutputType getHdrOutputType() const { return mHdrOutputType; } private: explicit DisplayMode(hal::HWConfigId id) : mHwcId(id) {} Loading @@ -187,7 +187,7 @@ private: Dpi mDpi; int32_t mGroup = -1; std::optional<hal::VrrConfig> mVrrConfig; OutputType mHdrOutputType; composer3::OutputType mHdrOutputType; }; inline bool equalsExceptDisplayModeId(const DisplayMode& lhs, const DisplayMode& rhs) { Loading Loading
libs/gui/SurfaceComposerClient.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -2739,6 +2739,7 @@ void SurfaceComposerClient::getDynamicDisplayInfoInternal(gui::DynamicDisplayInf outMode.sfVsyncOffset = mode.sfVsyncOffset; outMode.presentationDeadline = mode.presentationDeadline; outMode.group = mode.group; outMode.outputType = static_cast<ui::OutputType>(mode.outputType); std::transform(mode.supportedHdrTypes.begin(), mode.supportedHdrTypes.end(), std::back_inserter(outMode.supportedHdrTypes), [](const int32_t& value) { return static_cast<ui::Hdr>(value); }); Loading
libs/gui/aidl/android/gui/DisplayMode.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -36,4 +36,5 @@ parcelable DisplayMode { long sfVsyncOffset = 0; long presentationDeadline = 0; int group = -1; int outputType = 0; }
libs/ui/include/ui/DisplayMode.h +2 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <type_traits> #include <ui/GraphicTypes.h> #include <ui/OutputType.h> #include <ui/Size.h> #include <utils/Flattenable.h> #include <utils/Timers.h> Loading @@ -44,6 +45,7 @@ struct DisplayMode { nsecs_t sfVsyncOffset = 0; nsecs_t presentationDeadline = 0; int32_t group = -1; ui::OutputType outputType; }; } // namespace android::ui
libs/ui/include/ui/OutputType.h 0 → 100644 +47 −0 Original line number Diff line number Diff line /* * Copyright 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef ANDROID_UI_OUTPUT_TYPE_H #define ANDROID_UI_OUTPUT_TYPE_H #include <stdint.h> namespace android::ui { // Must be kept in sync with composer3/OutputType.aidl enum class OutputType : int32_t { /** * Invalid HDR output type */ OUTPUT_TYPE_INVALID = 0, /* * Display output format will be chosen by the HAL implementation * and will not adjust to match the content format */ OUTPUT_TYPE_SYSTEM = 1, /** * Display supports SDR output type */ OUTPUT_TYPE_SDR = 2, /** * Display supports HDR10 output type */ OUTPUT_TYPE_HDR10 = 3, }; } // namespace android::ui #endif // ANDROID_UI_OUTPUT_TYPE_H
services/surfaceflinger/DisplayHardware/DisplayMode.h +4 −4 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ namespace android { using aidl::android::hardware::graphics::composer3::OutputType; namespace composer3 = aidl::android::hardware::graphics::composer3; namespace hal = android::hardware::graphics::composer::hal; class DisplayMode; Loading Loading @@ -115,7 +115,7 @@ public: return *this; } Builder& setHdrOutputType(OutputType type) { Builder& setHdrOutputType(composer3::OutputType type) { mDisplayMode->mHdrOutputType = type; return *this; } Loading Loading @@ -172,7 +172,7 @@ public: // without visual interruptions such as a black screen. int32_t getGroup() const { return mGroup; } OutputType getHdrOutputType() const { return mHdrOutputType; } composer3::OutputType getHdrOutputType() const { return mHdrOutputType; } private: explicit DisplayMode(hal::HWConfigId id) : mHwcId(id) {} Loading @@ -187,7 +187,7 @@ private: Dpi mDpi; int32_t mGroup = -1; std::optional<hal::VrrConfig> mVrrConfig; OutputType mHdrOutputType; composer3::OutputType mHdrOutputType; }; inline bool equalsExceptDisplayModeId(const DisplayMode& lhs, const DisplayMode& rhs) { Loading