1 /* 2 * Copyright 2021 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #pragma once 18 19 #include "DisplayMode.h" 20 21 #include <cstdint> 22 #include <optional> 23 #include <vector> 24 25 #include <ui/GraphicTypes.h> 26 #include <ui/HdrCapabilities.h> 27 28 namespace android::ui { 29 30 // Information about a physical display which may change on hotplug reconnect. 31 struct DynamicDisplayInfo { 32 std::vector<ui::DisplayMode> supportedDisplayModes; 33 34 // This struct is going to be serialized over binder, so 35 // we can't use size_t because it may have different width 36 // in the client process. 37 ui::DisplayModeId activeDisplayModeId; 38 float renderFrameRate; 39 40 std::vector<ui::ColorMode> supportedColorModes; 41 ui::ColorMode activeColorMode; 42 HdrCapabilities hdrCapabilities; 43 44 // True if the display reports support for HDMI 2.1 Auto Low Latency Mode. 45 // For more information, see the HDMI 2.1 specification. 46 bool autoLowLatencyModeSupported; 47 48 // True if the display reports support for Game Content Type. 49 // For more information, see the HDMI 1.4 specification. 50 bool gameContentTypeSupported; 51 52 // The boot display mode preferred by the implementation. 53 ui::DisplayModeId preferredBootDisplayMode; 54 55 std::optional<ui::DisplayMode> getActiveDisplayMode() const; 56 }; 57 58 } // namespace android::ui 59