Mathias Agopian | a350ff9 | 2010-08-10 17:14:02 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010 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 | #ifndef ANDROID_SF_HWCOMPOSER_H |
| 18 | #define ANDROID_SF_HWCOMPOSER_H |
| 19 | |
Dominik Laskowski | 1af4793 | 2018-11-12 10:20:46 -0800 | [diff] [blame] | 20 | #include <cstdint> |
Dan Stoza | 9e56aa0 | 2015-11-02 13:00:03 -0800 | [diff] [blame] | 21 | #include <memory> |
Dominik Laskowski | 1af4793 | 2018-11-12 10:20:46 -0800 | [diff] [blame] | 22 | #include <mutex> |
Steven Thomas | 6e8f706 | 2017-11-22 14:15:29 -0800 | [diff] [blame] | 23 | #include <optional> |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 24 | #include <unordered_map> |
| 25 | #include <unordered_set> |
Dan Stoza | 9e56aa0 | 2015-11-02 13:00:03 -0800 | [diff] [blame] | 26 | #include <vector> |
| 27 | |
Dominik Laskowski | 1af4793 | 2018-11-12 10:20:46 -0800 | [diff] [blame] | 28 | #include <android-base/thread_annotations.h> |
| 29 | #include <ui/Fence.h> |
| 30 | #include <ui/GraphicTypes.h> |
| 31 | #include <utils/StrongPointer.h> |
| 32 | #include <utils/Timers.h> |
| 33 | |
Dominik Laskowski | e9ef7c4 | 2018-03-12 19:34:30 -0700 | [diff] [blame] | 34 | #include "DisplayIdentification.h" |
Dominik Laskowski | 1af4793 | 2018-11-12 10:20:46 -0800 | [diff] [blame] | 35 | #include "HWC2.h" |
Dan Stoza | 9e56aa0 | 2015-11-02 13:00:03 -0800 | [diff] [blame] | 36 | |
Mathias Agopian | a350ff9 | 2010-08-10 17:14:02 -0700 | [diff] [blame] | 37 | namespace android { |
Mathias Agopian | a350ff9 | 2010-08-10 17:14:02 -0700 | [diff] [blame] | 38 | |
Jesse Hall | 399184a | 2014-03-03 15:42:54 -0800 | [diff] [blame] | 39 | class GraphicBuffer; |
Mathias Agopian | 8372785 | 2010-09-23 18:13:21 -0700 | [diff] [blame] | 40 | class String8; |
Lloyd Pique | e39cad2 | 2017-12-20 17:01:29 -0800 | [diff] [blame] | 41 | class TestableSurfaceFlinger; |
David Sodman | fb95bcc | 2017-12-22 15:45:30 -0800 | [diff] [blame] | 42 | struct CompositionInfo; |
Mathias Agopian | 8372785 | 2010-09-23 18:13:21 -0700 | [diff] [blame] | 43 | |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 44 | namespace Hwc2 { |
| 45 | class Composer; |
| 46 | } // namespace Hwc2 |
| 47 | |
Mathias Agopian | a350ff9 | 2010-08-10 17:14:02 -0700 | [diff] [blame] | 48 | class HWComposer |
| 49 | { |
| 50 | public: |
Dominik Laskowski | 1af4793 | 2018-11-12 10:20:46 -0800 | [diff] [blame] | 51 | explicit HWComposer(std::unique_ptr<Hwc2::Composer> composer); |
Mathias Agopian | 8b736f1 | 2012-08-13 17:54:26 -0700 | [diff] [blame] | 52 | |
Mathias Agopian | a350ff9 | 2010-08-10 17:14:02 -0700 | [diff] [blame] | 53 | ~HWComposer(); |
| 54 | |
Steven Thomas | 94e35b9 | 2017-07-26 18:48:28 -0700 | [diff] [blame] | 55 | void registerCallback(HWC2::ComposerCallback* callback, |
| 56 | int32_t sequenceId); |
Mathias Agopian | a350ff9 | 2010-08-10 17:14:02 -0700 | [diff] [blame] | 57 | |
Dominik Laskowski | a2edf61 | 2018-06-01 13:15:16 -0700 | [diff] [blame] | 58 | bool getDisplayIdentificationData(hwc2_display_t hwcDisplayId, uint8_t* outPort, |
Dominik Laskowski | e9ef7c4 | 2018-03-12 19:34:30 -0700 | [diff] [blame] | 59 | DisplayIdentificationData* outData) const; |
| 60 | |
Dan Stoza | 9f26a9c | 2016-06-22 14:51:09 -0700 | [diff] [blame] | 61 | bool hasCapability(HWC2::Capability capability) const; |
| 62 | |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 63 | // Attempts to allocate a virtual display and returns its ID if created on the HWC device. |
| 64 | std::optional<DisplayId> allocateVirtualDisplay(uint32_t width, uint32_t height, |
| 65 | ui::PixelFormat* format); |
Mathias Agopian | e60b068 | 2012-08-21 23:34:09 -0700 | [diff] [blame] | 66 | |
Dan Stoza | 9e56aa0 | 2015-11-02 13:00:03 -0800 | [diff] [blame] | 67 | // Attempts to create a new layer on this display |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 68 | HWC2::Layer* createLayer(DisplayId displayId); |
Steven Thomas | 94e35b9 | 2017-07-26 18:48:28 -0700 | [diff] [blame] | 69 | // Destroy a previously created layer |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 70 | void destroyLayer(DisplayId displayId, HWC2::Layer* layer); |
Mathias Agopian | e60b068 | 2012-08-21 23:34:09 -0700 | [diff] [blame] | 71 | |
Mathias Agopian | a350ff9 | 2010-08-10 17:14:02 -0700 | [diff] [blame] | 72 | // Asks the HAL what it can do |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 73 | status_t prepare(DisplayId displayId, std::vector<CompositionInfo>& compositionData); |
Mathias Agopian | a350ff9 | 2010-08-10 17:14:02 -0700 | [diff] [blame] | 74 | |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 75 | status_t setClientTarget(DisplayId displayId, uint32_t slot, const sp<Fence>& acquireFence, |
| 76 | const sp<GraphicBuffer>& target, ui::Dataspace dataspace); |
Dan Stoza | 9e56aa0 | 2015-11-02 13:00:03 -0800 | [diff] [blame] | 77 | |
Fabien Sanglard | a87aa7b | 2016-11-30 16:27:22 -0800 | [diff] [blame] | 78 | // Present layers to the display and read releaseFences. |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 79 | status_t presentAndGetReleaseFences(DisplayId displayId); |
Mathias Agopian | a350ff9 | 2010-08-10 17:14:02 -0700 | [diff] [blame] | 80 | |
Prashant Malani | 2c9b11f | 2014-05-25 01:36:31 -0700 | [diff] [blame] | 81 | // set power mode |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 82 | status_t setPowerMode(DisplayId displayId, int mode); |
Colin Cross | 10fbdb6 | 2012-07-12 17:56:34 -0700 | [diff] [blame] | 83 | |
Michael Lentine | 6c9e34a | 2014-07-14 13:48:55 -0700 | [diff] [blame] | 84 | // set active config |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 85 | status_t setActiveConfig(DisplayId displayId, size_t configId); |
Michael Lentine | 6c9e34a | 2014-07-14 13:48:55 -0700 | [diff] [blame] | 86 | |
Dan Stoza | 9f26a9c | 2016-06-22 14:51:09 -0700 | [diff] [blame] | 87 | // Sets a color transform to be applied to the result of composition |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 88 | status_t setColorTransform(DisplayId displayId, const mat4& transform); |
Dan Stoza | 9f26a9c | 2016-06-22 14:51:09 -0700 | [diff] [blame] | 89 | |
Andy McFadden | 27ec573 | 2012-10-02 19:04:45 -0700 | [diff] [blame] | 90 | // reset state when an external, non-virtual display is disconnected |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 91 | void disconnectDisplay(DisplayId displayId); |
Mathias Agopian | da27af9 | 2012-09-13 18:17:13 -0700 | [diff] [blame] | 92 | |
Mathias Agopian | e60b068 | 2012-08-21 23:34:09 -0700 | [diff] [blame] | 93 | // does this display have layers handled by HWC |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 94 | bool hasDeviceComposition(const std::optional<DisplayId>& displayId) const; |
Mathias Agopian | e60b068 | 2012-08-21 23:34:09 -0700 | [diff] [blame] | 95 | |
Madhuri Athota | 88a905b | 2017-05-04 16:58:15 +0530 | [diff] [blame] | 96 | // does this display have pending request to flip client target |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 97 | bool hasFlipClientTargetRequest(const std::optional<DisplayId>& displayId) const; |
Madhuri Athota | 88a905b | 2017-05-04 16:58:15 +0530 | [diff] [blame] | 98 | |
Mathias Agopian | e60b068 | 2012-08-21 23:34:09 -0700 | [diff] [blame] | 99 | // does this display have layers handled by GLES |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 100 | bool hasClientComposition(const std::optional<DisplayId>& displayId) const; |
Mathias Agopian | 9c6e297 | 2011-09-20 17:21:56 -0700 | [diff] [blame] | 101 | |
Fabien Sanglard | 11d0fc3 | 2016-12-01 15:43:01 -0800 | [diff] [blame] | 102 | // get the present fence received from the last call to present. |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 103 | sp<Fence> getPresentFence(DisplayId displayId) const; |
Mathias Agopian | da27af9 | 2012-09-13 18:17:13 -0700 | [diff] [blame] | 104 | |
Dan Stoza | 9e56aa0 | 2015-11-02 13:00:03 -0800 | [diff] [blame] | 105 | // Get last release fence for the given layer |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 106 | sp<Fence> getLayerReleaseFence(DisplayId displayId, HWC2::Layer* layer) const; |
Andy McFadden | b0d1dd3 | 2012-09-10 14:08:09 -0700 | [diff] [blame] | 107 | |
Jesse Hall | 851cfe8 | 2013-03-20 13:44:00 -0700 | [diff] [blame] | 108 | // Set the output buffer and acquire fence for a virtual display. |
Dan Stoza | 9e56aa0 | 2015-11-02 13:00:03 -0800 | [diff] [blame] | 109 | // Returns INVALID_OPERATION if displayId is not a virtual display. |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 110 | status_t setOutputBuffer(DisplayId displayId, const sp<Fence>& acquireFence, |
| 111 | const sp<GraphicBuffer>& buffer); |
Jesse Hall | 851cfe8 | 2013-03-20 13:44:00 -0700 | [diff] [blame] | 112 | |
Dan Stoza | 9e56aa0 | 2015-11-02 13:00:03 -0800 | [diff] [blame] | 113 | // After SurfaceFlinger has retrieved the release fences for all the frames, |
| 114 | // it can call this to clear the shared pointers in the release fence map |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 115 | void clearReleaseFences(DisplayId displayId); |
Mathias Agopian | 3e8b853 | 2012-05-13 20:42:01 -0700 | [diff] [blame] | 116 | |
Peiyong Lin | 6266589 | 2018-04-16 11:07:44 -0700 | [diff] [blame] | 117 | // Fetches the HDR capabilities of the given display |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 118 | status_t getHdrCapabilities(DisplayId displayId, HdrCapabilities* outCapabilities); |
Dan Stoza | c4f471e | 2016-03-24 09:31:08 -0700 | [diff] [blame] | 119 | |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 120 | int32_t getSupportedPerFrameMetadata(DisplayId displayId) const; |
Peiyong Lin | 0ac5f4e | 2018-04-19 22:06:34 -0700 | [diff] [blame] | 121 | |
Peiyong Lin | 0e7a791 | 2018-04-05 14:36:36 -0700 | [diff] [blame] | 122 | // Returns the available RenderIntent of the given display. |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 123 | std::vector<ui::RenderIntent> getRenderIntents(DisplayId displayId, |
| 124 | ui::ColorMode colorMode) const; |
Peiyong Lin | 0e7a791 | 2018-04-05 14:36:36 -0700 | [diff] [blame] | 125 | |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 126 | mat4 getDataspaceSaturationMatrix(DisplayId displayId, ui::Dataspace dataspace); |
Peiyong Lin | 0e7a791 | 2018-04-05 14:36:36 -0700 | [diff] [blame] | 127 | |
Kevin DuBois | 9c0a176 | 2018-10-16 13:32:31 -0700 | [diff] [blame^] | 128 | // Returns the attributes of the color sampling engine. |
| 129 | status_t getDisplayedContentSamplingAttributes(DisplayId displayId, ui::PixelFormat* outFormat, |
| 130 | ui::Dataspace* outDataspace, |
| 131 | uint8_t* outComponentMask); |
| 132 | |
Mathias Agopian | 3eb38cb | 2012-04-03 22:09:52 -0700 | [diff] [blame] | 133 | // Events handling --------------------------------------------------------- |
| 134 | |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 135 | // Returns stable display ID (and display name on connection of new or previously disconnected |
| 136 | // display), or std::nullopt if hotplug event was ignored. |
| 137 | std::optional<DisplayIdentificationInfo> onHotplug(hwc2_display_t hwcDisplayId, |
| 138 | HWC2::Connection connection); |
Steven Thomas | 94e35b9 | 2017-07-26 18:48:28 -0700 | [diff] [blame] | 139 | |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 140 | bool onVsync(hwc2_display_t hwcDisplayId, int64_t timestamp); |
| 141 | void setVsyncEnabled(DisplayId displayId, HWC2::Vsync enabled); |
Mathias Agopian | 3eb38cb | 2012-04-03 22:09:52 -0700 | [diff] [blame] | 142 | |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 143 | nsecs_t getRefreshTimestamp(DisplayId displayId) const; |
| 144 | bool isConnected(DisplayId displayId) const; |
Dan Stoza | 7f7da32 | 2014-05-02 15:26:25 -0700 | [diff] [blame] | 145 | |
Dan Stoza | 9e56aa0 | 2015-11-02 13:00:03 -0800 | [diff] [blame] | 146 | // Non-const because it can update configMap inside of mDisplayData |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 147 | std::vector<std::shared_ptr<const HWC2::Display::Config>> getConfigs(DisplayId displayId) const; |
Dan Stoza | 7f7da32 | 2014-05-02 15:26:25 -0700 | [diff] [blame] | 148 | |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 149 | std::shared_ptr<const HWC2::Display::Config> getActiveConfig(DisplayId displayId) const; |
| 150 | int getActiveConfigIndex(DisplayId displayId) const; |
Mathias Agopian | 3eb38cb | 2012-04-03 22:09:52 -0700 | [diff] [blame] | 151 | |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 152 | std::vector<ui::ColorMode> getColorModes(DisplayId displayId) const; |
Michael Wright | 28f24d0 | 2016-07-12 13:30:53 -0700 | [diff] [blame] | 153 | |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 154 | status_t setActiveColorMode(DisplayId displayId, ui::ColorMode mode, |
| 155 | ui::RenderIntent renderIntent); |
Courtney Goeltzenleuchter | fad9d8c | 2016-06-23 11:49:50 -0600 | [diff] [blame] | 156 | |
Hendrik Wagenaar | 87670ff | 2017-02-01 12:10:46 -0800 | [diff] [blame] | 157 | bool isUsingVrComposer() const; |
| 158 | |
Mathias Agopian | 3eb38cb | 2012-04-03 22:09:52 -0700 | [diff] [blame] | 159 | // for debugging ---------------------------------------------------------- |
Mathias Agopian | 74d211a | 2013-04-22 16:55:35 +0200 | [diff] [blame] | 160 | void dump(String8& out) const; |
Mathias Agopian | 8372785 | 2010-09-23 18:13:21 -0700 | [diff] [blame] | 161 | |
Dominik Laskowski | 1af4793 | 2018-11-12 10:20:46 -0800 | [diff] [blame] | 162 | Hwc2::Composer* getComposer() const { return mHwcDevice->getComposer(); } |
Steven Thomas | 6e8f706 | 2017-11-22 14:15:29 -0800 | [diff] [blame] | 163 | |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 164 | // TODO(b/74619554): Remove special cases for internal/external display. |
| 165 | std::optional<hwc2_display_t> getInternalHwcDisplayId() const { return mInternalHwcDisplayId; } |
| 166 | std::optional<hwc2_display_t> getExternalHwcDisplayId() const { return mExternalHwcDisplayId; } |
| 167 | |
| 168 | std::optional<DisplayId> toPhysicalDisplayId(hwc2_display_t hwcDisplayId) const; |
| 169 | std::optional<hwc2_display_t> fromPhysicalDisplayId(DisplayId displayId) const; |
| 170 | |
Mathias Agopian | a350ff9 | 2010-08-10 17:14:02 -0700 | [diff] [blame] | 171 | private: |
Lloyd Pique | e39cad2 | 2017-12-20 17:01:29 -0800 | [diff] [blame] | 172 | // For unit tests |
| 173 | friend TestableSurfaceFlinger; |
| 174 | |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 175 | std::optional<DisplayIdentificationInfo> onHotplugConnect(hwc2_display_t hwcDisplayId); |
| 176 | |
Dan Stoza | 9e56aa0 | 2015-11-02 13:00:03 -0800 | [diff] [blame] | 177 | static void validateChange(HWC2::Composition from, HWC2::Composition to); |
Mathias Agopian | 31d2843 | 2012-04-03 16:31:39 -0700 | [diff] [blame] | 178 | |
Mathias Agopian | e60b068 | 2012-08-21 23:34:09 -0700 | [diff] [blame] | 179 | struct DisplayData { |
Dominik Laskowski | c1f18f6 | 2018-06-13 15:17:55 -0700 | [diff] [blame] | 180 | bool isVirtual = false; |
Dominik Laskowski | f9750f2 | 2018-06-06 12:24:53 -0700 | [diff] [blame] | 181 | bool hasClientComposition = false; |
| 182 | bool hasDeviceComposition = false; |
| 183 | HWC2::Display* hwcDisplay = nullptr; |
Dan Stoza | 9e56aa0 | 2015-11-02 13:00:03 -0800 | [diff] [blame] | 184 | HWC2::DisplayRequest displayRequests; |
Dominik Laskowski | f9750f2 | 2018-06-06 12:24:53 -0700 | [diff] [blame] | 185 | sp<Fence> lastPresentFence = Fence::NO_FENCE; // signals when the last set op retires |
Steven Thomas | 94e35b9 | 2017-07-26 18:48:28 -0700 | [diff] [blame] | 186 | std::unordered_map<HWC2::Layer*, sp<Fence>> releaseFences; |
Dominik Laskowski | f9750f2 | 2018-06-06 12:24:53 -0700 | [diff] [blame] | 187 | buffer_handle_t outbufHandle = nullptr; |
| 188 | sp<Fence> outbufAcquireFence = Fence::NO_FENCE; |
Dan Stoza | 9e56aa0 | 2015-11-02 13:00:03 -0800 | [diff] [blame] | 189 | mutable std::unordered_map<int32_t, |
| 190 | std::shared_ptr<const HWC2::Display::Config>> configMap; |
Jamie Gennis | 2ec3e07 | 2012-11-11 16:24:33 -0800 | [diff] [blame] | 191 | |
Fabien Sanglard | 249c0ae | 2017-06-19 19:22:36 -0700 | [diff] [blame] | 192 | bool validateWasSkipped; |
| 193 | HWC2::Error presentError; |
Dominik Laskowski | 1af4793 | 2018-11-12 10:20:46 -0800 | [diff] [blame] | 194 | |
| 195 | bool vsyncTraceToggle = false; |
| 196 | |
| 197 | std::mutex vsyncEnabledLock; |
| 198 | HWC2::Vsync vsyncEnabled GUARDED_BY(vsyncEnabledLock) = HWC2::Vsync::Disable; |
| 199 | |
| 200 | mutable std::mutex lastHwVsyncLock; |
| 201 | nsecs_t lastHwVsync GUARDED_BY(lastHwVsyncLock) = 0; |
Mathias Agopian | e60b068 | 2012-08-21 23:34:09 -0700 | [diff] [blame] | 202 | }; |
| 203 | |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 204 | std::unordered_map<DisplayId, DisplayData> mDisplayData; |
Dominik Laskowski | b04f98a | 2018-11-07 21:07:16 -0800 | [diff] [blame] | 205 | |
| 206 | // This must be destroyed before mDisplayData, because destructor may call back into HWComposer |
| 207 | // and look up DisplayData. |
| 208 | std::unique_ptr<HWC2::Device> mHwcDevice; |
| 209 | |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 210 | std::unordered_map<hwc2_display_t, DisplayId> mPhysicalDisplayIdMap; |
| 211 | std::optional<hwc2_display_t> mInternalHwcDisplayId; |
| 212 | std::optional<hwc2_display_t> mExternalHwcDisplayId; |
| 213 | bool mHasMultiDisplaySupport = false; |
| 214 | |
Dominik Laskowski | 3415776 | 2018-10-31 13:07:19 -0700 | [diff] [blame] | 215 | std::unordered_set<DisplayId> mFreeVirtualDisplayIds; |
Dominik Laskowski | 075d317 | 2018-05-24 15:50:06 -0700 | [diff] [blame] | 216 | uint32_t mNextVirtualDisplayId = 0; |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 217 | uint32_t mRemainingHwcVirtualDisplays{mHwcDevice->getMaxVirtualDisplayCount()}; |
Mathias Agopian | a350ff9 | 2010-08-10 17:14:02 -0700 | [diff] [blame] | 218 | }; |
| 219 | |
Dominik Laskowski | 1af4793 | 2018-11-12 10:20:46 -0800 | [diff] [blame] | 220 | } // namespace android |
Mathias Agopian | a350ff9 | 2010-08-10 17:14:02 -0700 | [diff] [blame] | 221 | |
| 222 | #endif // ANDROID_SF_HWCOMPOSER_H |