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/LayerStack.h +0 −20 Original line number Diff line number Diff line Loading @@ -61,24 +61,4 @@ inline bool operator<(LayerStack lhs, LayerStack rhs) { return lhs.id < rhs.id; } // A LayerFilter determines if a layer is included for output to a display. struct LayerFilter { LayerStack layerStack; // True if the layer is only output to internal displays, i.e. excluded from screenshots, screen // recordings, and mirroring to virtual or external displays. Used for display cutout overlays. bool toInternalDisplay = false; // Returns true if the input filter can be output to this filter. bool includes(LayerFilter other) const { // The layer stacks must match. if (other.layerStack == UNASSIGNED_LAYER_STACK || other.layerStack != layerStack) { return false; } // The output must be to an internal display if the input filter has that constraint. return !other.toInternalDisplay || toInternalDisplay; } }; } // 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 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/LayerStack.h +0 −20 Original line number Diff line number Diff line Loading @@ -61,24 +61,4 @@ inline bool operator<(LayerStack lhs, LayerStack rhs) { return lhs.id < rhs.id; } // A LayerFilter determines if a layer is included for output to a display. struct LayerFilter { LayerStack layerStack; // True if the layer is only output to internal displays, i.e. excluded from screenshots, screen // recordings, and mirroring to virtual or external displays. Used for display cutout overlays. bool toInternalDisplay = false; // Returns true if the input filter can be output to this filter. bool includes(LayerFilter other) const { // The layer stacks must match. if (other.layerStack == UNASSIGNED_LAYER_STACK || other.layerStack != layerStack) { return false; } // The output must be to an internal display if the input filter has that constraint. return !other.toInternalDisplay || toInternalDisplay; } }; } // 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