Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 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_COMPOSER_HAL_H |
| 18 | #define ANDROID_SF_COMPOSER_HAL_H |
| 19 | |
Chia-I Wu | cd8d7f0 | 2016-11-16 11:02:31 +0800 | [diff] [blame] | 20 | #include <memory> |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 21 | #include <string> |
Chia-I Wu | cd8d7f0 | 2016-11-16 11:02:31 +0800 | [diff] [blame] | 22 | #include <unordered_map> |
| 23 | #include <utility> |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 24 | #include <vector> |
| 25 | |
mamik | 94e91f6 | 2019-08-19 09:11:33 -0700 | [diff] [blame] | 26 | #if defined(USE_VR_COMPOSER) && USE_VR_COMPOSER |
| 27 | #include <android/frameworks/vr/composer/2.0/IVrComposerClient.h> |
| 28 | #endif // defined(USE_VR_COMPOSER) && USE_VR_COMPOSER |
Peiyong Lin | 34beb7a | 2018-03-28 11:57:12 -0700 | [diff] [blame] | 29 | #include <android/hardware/graphics/common/1.1/types.h> |
Dominik Laskowski | 25a4e7d | 2019-09-20 14:50:10 -0700 | [diff] [blame] | 30 | #include <android/hardware/graphics/composer/2.4/IComposer.h> |
| 31 | #include <android/hardware/graphics/composer/2.4/IComposerClient.h> |
Peiyong Lin | afa0f57 | 2020-01-13 16:35:02 -0800 | [diff] [blame^] | 32 | #include <composer-command-buffer/2.4/ComposerCommandBuffer.h> |
Courtney Goeltzenleuchter | f9c98e5 | 2018-02-12 07:23:17 -0700 | [diff] [blame] | 33 | #include <gui/HdrMetadata.h> |
Peiyong Lin | 0e7a791 | 2018-04-05 14:36:36 -0700 | [diff] [blame] | 34 | #include <math/mat4.h> |
Kevin DuBois | 1d4249a | 2018-08-29 10:45:14 -0700 | [diff] [blame] | 35 | #include <ui/DisplayedFrameStats.h> |
Lloyd Pique | d0094aa | 2017-12-20 16:43:28 -0800 | [diff] [blame] | 36 | #include <ui/GraphicBuffer.h> |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 37 | #include <utils/StrongPointer.h> |
| 38 | |
| 39 | namespace android { |
| 40 | |
| 41 | namespace Hwc2 { |
| 42 | |
mamik | 94e91f6 | 2019-08-19 09:11:33 -0700 | [diff] [blame] | 43 | #if defined(USE_VR_COMPOSER) && USE_VR_COMPOSER |
| 44 | using frameworks::vr::composer::V2_0::IVrComposerClient; |
| 45 | #endif // defined(USE_VR_COMPOSER) && USE_VR_COMPOSER |
Daniel Nicoara | 1f42e3a | 2017-04-10 13:27:32 -0400 | [diff] [blame] | 46 | |
Dominik Laskowski | 6231aaf | 2018-04-02 17:10:23 -0700 | [diff] [blame] | 47 | namespace types = hardware::graphics::common; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 48 | |
Dominik Laskowski | 6231aaf | 2018-04-02 17:10:23 -0700 | [diff] [blame] | 49 | namespace V2_1 = hardware::graphics::composer::V2_1; |
| 50 | namespace V2_2 = hardware::graphics::composer::V2_2; |
Dominik Laskowski | e9ef7c4 | 2018-03-12 19:34:30 -0700 | [diff] [blame] | 51 | namespace V2_3 = hardware::graphics::composer::V2_3; |
Dominik Laskowski | 25a4e7d | 2019-09-20 14:50:10 -0700 | [diff] [blame] | 52 | namespace V2_4 = hardware::graphics::composer::V2_4; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 53 | |
Dominik Laskowski | 6231aaf | 2018-04-02 17:10:23 -0700 | [diff] [blame] | 54 | using types::V1_0::ColorTransform; |
Dominik Laskowski | 6231aaf | 2018-04-02 17:10:23 -0700 | [diff] [blame] | 55 | using types::V1_0::Transform; |
Dominik Laskowski | 6231aaf | 2018-04-02 17:10:23 -0700 | [diff] [blame] | 56 | using types::V1_1::RenderIntent; |
Valerie Hau | 9758ae0 | 2018-10-09 16:05:09 -0700 | [diff] [blame] | 57 | using types::V1_2::ColorMode; |
| 58 | using types::V1_2::Dataspace; |
Valerie Hau | e9e843a | 2018-12-18 13:39:23 -0800 | [diff] [blame] | 59 | using types::V1_2::Hdr; |
Kevin DuBois | 73d0f48 | 2019-01-25 11:18:03 -0800 | [diff] [blame] | 60 | using types::V1_2::PixelFormat; |
Valerie Hau | e9e843a | 2018-12-18 13:39:23 -0800 | [diff] [blame] | 61 | |
Dominik Laskowski | 6231aaf | 2018-04-02 17:10:23 -0700 | [diff] [blame] | 62 | using V2_1::Config; |
| 63 | using V2_1::Display; |
| 64 | using V2_1::Error; |
Dominik Laskowski | 6231aaf | 2018-04-02 17:10:23 -0700 | [diff] [blame] | 65 | using V2_1::Layer; |
Peiyong Lin | afa0f57 | 2020-01-13 16:35:02 -0800 | [diff] [blame^] | 66 | using V2_4::CommandReaderBase; |
| 67 | using V2_4::CommandWriterBase; |
Dominik Laskowski | 25a4e7d | 2019-09-20 14:50:10 -0700 | [diff] [blame] | 68 | using V2_4::IComposer; |
Ady Abraham | 7159f57 | 2019-10-11 11:10:18 -0700 | [diff] [blame] | 69 | using V2_4::IComposerCallback; |
Dominik Laskowski | 25a4e7d | 2019-09-20 14:50:10 -0700 | [diff] [blame] | 70 | using V2_4::IComposerClient; |
Ady Abraham | 7159f57 | 2019-10-11 11:10:18 -0700 | [diff] [blame] | 71 | using V2_4::VsyncPeriodChangeTimeline; |
| 72 | using V2_4::VsyncPeriodNanos; |
Peiyong Lin | ed531a3 | 2018-10-26 18:27:56 -0700 | [diff] [blame] | 73 | using DisplayCapability = IComposerClient::DisplayCapability; |
Peiyong Lin | 0ac5f4e | 2018-04-19 22:06:34 -0700 | [diff] [blame] | 74 | using PerFrameMetadata = IComposerClient::PerFrameMetadata; |
| 75 | using PerFrameMetadataKey = IComposerClient::PerFrameMetadataKey; |
Valerie Hau | e9e843a | 2018-12-18 13:39:23 -0800 | [diff] [blame] | 76 | using PerFrameMetadataBlob = IComposerClient::PerFrameMetadataBlob; |
Peiyong Lin | 0ac5f4e | 2018-04-19 22:06:34 -0700 | [diff] [blame] | 77 | |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 78 | class Composer { |
| 79 | public: |
| 80 | virtual ~Composer() = 0; |
| 81 | |
| 82 | virtual std::vector<IComposer::Capability> getCapabilities() = 0; |
| 83 | virtual std::string dumpDebugInfo() = 0; |
| 84 | |
| 85 | virtual void registerCallback(const sp<IComposerCallback>& callback) = 0; |
| 86 | |
| 87 | // Returns true if the connected composer service is running in a remote |
| 88 | // process, false otherwise. This will return false if the service is |
| 89 | // configured in passthrough mode, for example. |
| 90 | virtual bool isRemote() = 0; |
| 91 | |
| 92 | // Reset all pending commands in the command buffer. Useful if you want to |
| 93 | // skip a frame but have already queued some commands. |
| 94 | virtual void resetCommands() = 0; |
| 95 | |
| 96 | // Explicitly flush all pending commands in the command buffer. |
| 97 | virtual Error executeCommands() = 0; |
| 98 | |
| 99 | virtual uint32_t getMaxVirtualDisplayCount() = 0; |
| 100 | virtual bool isUsingVrComposer() const = 0; |
| 101 | virtual Error createVirtualDisplay(uint32_t width, uint32_t height, PixelFormat* format, |
| 102 | Display* outDisplay) = 0; |
| 103 | virtual Error destroyVirtualDisplay(Display display) = 0; |
| 104 | |
| 105 | virtual Error acceptDisplayChanges(Display display) = 0; |
| 106 | |
| 107 | virtual Error createLayer(Display display, Layer* outLayer) = 0; |
| 108 | virtual Error destroyLayer(Display display, Layer layer) = 0; |
| 109 | |
| 110 | virtual Error getActiveConfig(Display display, Config* outConfig) = 0; |
| 111 | virtual Error getChangedCompositionTypes( |
| 112 | Display display, std::vector<Layer>* outLayers, |
| 113 | std::vector<IComposerClient::Composition>* outTypes) = 0; |
| 114 | virtual Error getColorModes(Display display, std::vector<ColorMode>* outModes) = 0; |
| 115 | virtual Error getDisplayAttribute(Display display, Config config, |
| 116 | IComposerClient::Attribute attribute, int32_t* outValue) = 0; |
| 117 | virtual Error getDisplayConfigs(Display display, std::vector<Config>* outConfigs) = 0; |
| 118 | virtual Error getDisplayName(Display display, std::string* outName) = 0; |
| 119 | |
| 120 | virtual Error getDisplayRequests(Display display, uint32_t* outDisplayRequestMask, |
| 121 | std::vector<Layer>* outLayers, |
| 122 | std::vector<uint32_t>* outLayerRequestMasks) = 0; |
| 123 | |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 124 | virtual Error getDozeSupport(Display display, bool* outSupport) = 0; |
| 125 | virtual Error getHdrCapabilities(Display display, std::vector<Hdr>* outTypes, |
| 126 | float* outMaxLuminance, float* outMaxAverageLuminance, |
| 127 | float* outMinLuminance) = 0; |
| 128 | |
| 129 | virtual Error getReleaseFences(Display display, std::vector<Layer>* outLayers, |
| 130 | std::vector<int>* outReleaseFences) = 0; |
| 131 | |
| 132 | virtual Error presentDisplay(Display display, int* outPresentFence) = 0; |
| 133 | |
| 134 | virtual Error setActiveConfig(Display display, Config config) = 0; |
| 135 | |
| 136 | /* |
| 137 | * The composer caches client targets internally. When target is nullptr, |
| 138 | * the composer uses slot to look up the client target from its cache. |
| 139 | * When target is not nullptr, the cache is updated with the new target. |
| 140 | */ |
| 141 | virtual Error setClientTarget(Display display, uint32_t slot, const sp<GraphicBuffer>& target, |
| 142 | int acquireFence, Dataspace dataspace, |
| 143 | const std::vector<IComposerClient::Rect>& damage) = 0; |
Peiyong Lin | 0e7a791 | 2018-04-05 14:36:36 -0700 | [diff] [blame] | 144 | virtual Error setColorMode(Display display, ColorMode mode, RenderIntent renderIntent) = 0; |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 145 | virtual Error setColorTransform(Display display, const float* matrix, ColorTransform hint) = 0; |
| 146 | virtual Error setOutputBuffer(Display display, const native_handle_t* buffer, |
| 147 | int releaseFence) = 0; |
| 148 | virtual Error setPowerMode(Display display, IComposerClient::PowerMode mode) = 0; |
| 149 | virtual Error setVsyncEnabled(Display display, IComposerClient::Vsync enabled) = 0; |
| 150 | |
| 151 | virtual Error setClientTargetSlotCount(Display display) = 0; |
| 152 | |
| 153 | virtual Error validateDisplay(Display display, uint32_t* outNumTypes, |
| 154 | uint32_t* outNumRequests) = 0; |
| 155 | |
| 156 | virtual Error presentOrValidateDisplay(Display display, uint32_t* outNumTypes, |
| 157 | uint32_t* outNumRequests, int* outPresentFence, |
| 158 | uint32_t* state) = 0; |
| 159 | |
| 160 | virtual Error setCursorPosition(Display display, Layer layer, int32_t x, int32_t y) = 0; |
| 161 | /* see setClientTarget for the purpose of slot */ |
| 162 | virtual Error setLayerBuffer(Display display, Layer layer, uint32_t slot, |
| 163 | const sp<GraphicBuffer>& buffer, int acquireFence) = 0; |
| 164 | virtual Error setLayerSurfaceDamage(Display display, Layer layer, |
| 165 | const std::vector<IComposerClient::Rect>& damage) = 0; |
| 166 | virtual Error setLayerBlendMode(Display display, Layer layer, |
| 167 | IComposerClient::BlendMode mode) = 0; |
| 168 | virtual Error setLayerColor(Display display, Layer layer, |
| 169 | const IComposerClient::Color& color) = 0; |
| 170 | virtual Error setLayerCompositionType(Display display, Layer layer, |
| 171 | IComposerClient::Composition type) = 0; |
| 172 | virtual Error setLayerDataspace(Display display, Layer layer, Dataspace dataspace) = 0; |
| 173 | virtual Error setLayerDisplayFrame(Display display, Layer layer, |
| 174 | const IComposerClient::Rect& frame) = 0; |
| 175 | virtual Error setLayerPlaneAlpha(Display display, Layer layer, float alpha) = 0; |
| 176 | virtual Error setLayerSidebandStream(Display display, Layer layer, |
| 177 | const native_handle_t* stream) = 0; |
| 178 | virtual Error setLayerSourceCrop(Display display, Layer layer, |
| 179 | const IComposerClient::FRect& crop) = 0; |
| 180 | virtual Error setLayerTransform(Display display, Layer layer, Transform transform) = 0; |
| 181 | virtual Error setLayerVisibleRegion(Display display, Layer layer, |
| 182 | const std::vector<IComposerClient::Rect>& visible) = 0; |
| 183 | virtual Error setLayerZOrder(Display display, Layer layer, uint32_t z) = 0; |
| 184 | virtual Error setLayerInfo(Display display, Layer layer, uint32_t type, uint32_t appId) = 0; |
Peiyong Lin | 0e7a791 | 2018-04-05 14:36:36 -0700 | [diff] [blame] | 185 | |
| 186 | // Composer HAL 2.2 |
Peiyong Lin | 0ac5f4e | 2018-04-19 22:06:34 -0700 | [diff] [blame] | 187 | virtual Error setLayerPerFrameMetadata( |
| 188 | Display display, Layer layer, |
| 189 | const std::vector<IComposerClient::PerFrameMetadata>& perFrameMetadatas) = 0; |
Chia-I Wu | d7e01d7 | 2018-06-21 13:39:09 +0800 | [diff] [blame] | 190 | virtual std::vector<IComposerClient::PerFrameMetadataKey> getPerFrameMetadataKeys( |
| 191 | Display display) = 0; |
Peiyong Lin | 0e7a791 | 2018-04-05 14:36:36 -0700 | [diff] [blame] | 192 | virtual Error getRenderIntents(Display display, ColorMode colorMode, |
| 193 | std::vector<RenderIntent>* outRenderIntents) = 0; |
| 194 | virtual Error getDataspaceSaturationMatrix(Dataspace dataspace, mat4* outMatrix) = 0; |
Dominik Laskowski | e9ef7c4 | 2018-03-12 19:34:30 -0700 | [diff] [blame] | 195 | |
| 196 | // Composer HAL 2.3 |
| 197 | virtual Error getDisplayIdentificationData(Display display, uint8_t* outPort, |
| 198 | std::vector<uint8_t>* outData) = 0; |
Peiyong Lin | 698147a | 2018-09-14 13:27:18 -0700 | [diff] [blame] | 199 | virtual Error setLayerColorTransform(Display display, Layer layer, |
| 200 | const float* matrix) = 0; |
Kevin DuBois | 9c0a176 | 2018-10-16 13:32:31 -0700 | [diff] [blame] | 201 | virtual Error getDisplayedContentSamplingAttributes(Display display, PixelFormat* outFormat, |
| 202 | Dataspace* outDataspace, |
| 203 | uint8_t* outComponentMask) = 0; |
Kevin DuBois | 74e5377 | 2018-11-19 10:52:38 -0800 | [diff] [blame] | 204 | virtual Error setDisplayContentSamplingEnabled(Display display, bool enabled, |
| 205 | uint8_t componentMask, uint64_t maxFrames) = 0; |
Kevin DuBois | 1d4249a | 2018-08-29 10:45:14 -0700 | [diff] [blame] | 206 | virtual Error getDisplayedContentSample(Display display, uint64_t maxFrames, uint64_t timestamp, |
| 207 | DisplayedFrameStats* outStats) = 0; |
Valerie Hau | e9e843a | 2018-12-18 13:39:23 -0800 | [diff] [blame] | 208 | virtual Error setLayerPerFrameMetadataBlobs( |
| 209 | Display display, Layer layer, const std::vector<PerFrameMetadataBlob>& metadata) = 0; |
Dan Gittik | 57e63c5 | 2019-01-18 16:37:54 +0000 | [diff] [blame] | 210 | virtual Error setDisplayBrightness(Display display, float brightness) = 0; |
Dominik Laskowski | 25a4e7d | 2019-09-20 14:50:10 -0700 | [diff] [blame] | 211 | |
| 212 | // Composer HAL 2.4 |
Ady Abraham | 7159f57 | 2019-10-11 11:10:18 -0700 | [diff] [blame] | 213 | virtual bool isVsyncPeriodSwitchSupported() = 0; |
Dominik Laskowski | 25a4e7d | 2019-09-20 14:50:10 -0700 | [diff] [blame] | 214 | virtual Error getDisplayCapabilities(Display display, |
| 215 | std::vector<DisplayCapability>* outCapabilities) = 0; |
Ady Abraham | 7159f57 | 2019-10-11 11:10:18 -0700 | [diff] [blame] | 216 | virtual V2_4::Error getDisplayConnectionType( |
| 217 | Display display, IComposerClient::DisplayConnectionType* outType) = 0; |
| 218 | virtual V2_4::Error getDisplayVsyncPeriod(Display display, |
| 219 | VsyncPeriodNanos* outVsyncPeriod) = 0; |
| 220 | virtual V2_4::Error setActiveConfigWithConstraints( |
| 221 | Display display, Config config, |
| 222 | const IComposerClient::VsyncPeriodChangeConstraints& vsyncPeriodChangeConstraints, |
| 223 | VsyncPeriodChangeTimeline* outTimeline) = 0; |
Galia Peycheva | 5492cb5 | 2019-10-30 14:13:16 +0100 | [diff] [blame] | 224 | |
| 225 | virtual V2_4::Error setAutoLowLatencyMode(Display displayId, bool on) = 0; |
| 226 | virtual V2_4::Error getSupportedContentTypes( |
| 227 | Display displayId, |
| 228 | std::vector<IComposerClient::ContentType>* outSupportedContentTypes) = 0; |
| 229 | virtual V2_4::Error setContentType(Display displayId, |
| 230 | IComposerClient::ContentType contentType) = 0; |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 231 | }; |
| 232 | |
| 233 | namespace impl { |
| 234 | |
Chia-I Wu | cd8d7f0 | 2016-11-16 11:02:31 +0800 | [diff] [blame] | 235 | class CommandReader : public CommandReaderBase { |
| 236 | public: |
| 237 | ~CommandReader(); |
| 238 | |
| 239 | // Parse and execute commands from the command queue. The commands are |
| 240 | // actually return values from the server and will be saved in ReturnData. |
| 241 | Error parse(); |
| 242 | |
| 243 | // Get and clear saved errors. |
| 244 | struct CommandError { |
| 245 | uint32_t location; |
| 246 | Error error; |
| 247 | }; |
| 248 | std::vector<CommandError> takeErrors(); |
| 249 | |
Chia-I Wu | 67e376d | 2016-12-19 11:36:22 +0800 | [diff] [blame] | 250 | bool hasChanges(Display display, uint32_t* outNumChangedCompositionTypes, |
| 251 | uint32_t* outNumLayerRequestMasks) const; |
Chia-I Wu | cd8d7f0 | 2016-11-16 11:02:31 +0800 | [diff] [blame] | 252 | |
| 253 | // Get and clear saved changed composition types. |
| 254 | void takeChangedCompositionTypes(Display display, |
Chia-I Wu | 67e376d | 2016-12-19 11:36:22 +0800 | [diff] [blame] | 255 | std::vector<Layer>* outLayers, |
| 256 | std::vector<IComposerClient::Composition>* outTypes); |
Chia-I Wu | cd8d7f0 | 2016-11-16 11:02:31 +0800 | [diff] [blame] | 257 | |
| 258 | // Get and clear saved display requests. |
| 259 | void takeDisplayRequests(Display display, |
Chia-I Wu | 67e376d | 2016-12-19 11:36:22 +0800 | [diff] [blame] | 260 | uint32_t* outDisplayRequestMask, std::vector<Layer>* outLayers, |
| 261 | std::vector<uint32_t>* outLayerRequestMasks); |
Chia-I Wu | cd8d7f0 | 2016-11-16 11:02:31 +0800 | [diff] [blame] | 262 | |
| 263 | // Get and clear saved release fences. |
Chia-I Wu | 67e376d | 2016-12-19 11:36:22 +0800 | [diff] [blame] | 264 | void takeReleaseFences(Display display, std::vector<Layer>* outLayers, |
| 265 | std::vector<int>* outReleaseFences); |
Chia-I Wu | cd8d7f0 | 2016-11-16 11:02:31 +0800 | [diff] [blame] | 266 | |
| 267 | // Get and clear saved present fence. |
Chia-I Wu | 67e376d | 2016-12-19 11:36:22 +0800 | [diff] [blame] | 268 | void takePresentFence(Display display, int* outPresentFence); |
Chia-I Wu | cd8d7f0 | 2016-11-16 11:02:31 +0800 | [diff] [blame] | 269 | |
Fabien Sanglard | 249c0ae | 2017-06-19 19:22:36 -0700 | [diff] [blame] | 270 | // Get what stage succeeded during PresentOrValidate: Present or Validate |
| 271 | void takePresentOrValidateStage(Display display, uint32_t * state); |
| 272 | |
Chia-I Wu | cd8d7f0 | 2016-11-16 11:02:31 +0800 | [diff] [blame] | 273 | private: |
| 274 | void resetData(); |
| 275 | |
| 276 | bool parseSelectDisplay(uint16_t length); |
| 277 | bool parseSetError(uint16_t length); |
| 278 | bool parseSetChangedCompositionTypes(uint16_t length); |
| 279 | bool parseSetDisplayRequests(uint16_t length); |
| 280 | bool parseSetPresentFence(uint16_t length); |
| 281 | bool parseSetReleaseFences(uint16_t length); |
Fabien Sanglard | 249c0ae | 2017-06-19 19:22:36 -0700 | [diff] [blame] | 282 | bool parseSetPresentOrValidateDisplayResult(uint16_t length); |
Peiyong Lin | afa0f57 | 2020-01-13 16:35:02 -0800 | [diff] [blame^] | 283 | bool parseSetClientTargetProperty(uint16_t length); |
Chia-I Wu | cd8d7f0 | 2016-11-16 11:02:31 +0800 | [diff] [blame] | 284 | |
| 285 | struct ReturnData { |
| 286 | uint32_t displayRequests = 0; |
| 287 | |
| 288 | std::vector<Layer> changedLayers; |
| 289 | std::vector<IComposerClient::Composition> compositionTypes; |
| 290 | |
| 291 | std::vector<Layer> requestedLayers; |
| 292 | std::vector<uint32_t> requestMasks; |
| 293 | |
| 294 | int presentFence = -1; |
| 295 | |
| 296 | std::vector<Layer> releasedLayers; |
| 297 | std::vector<int> releaseFences; |
Fabien Sanglard | 249c0ae | 2017-06-19 19:22:36 -0700 | [diff] [blame] | 298 | |
| 299 | uint32_t presentOrValidateState; |
Peiyong Lin | afa0f57 | 2020-01-13 16:35:02 -0800 | [diff] [blame^] | 300 | |
| 301 | // Composer 2.4 implementation can return a client target property |
| 302 | // structure to indicate the client target properties that hardware |
| 303 | // composer requests. The composer client must change the client target |
| 304 | // properties to match this request. |
| 305 | IComposerClient::ClientTargetProperty clientTargetProperty{PixelFormat::RGBA_8888, |
| 306 | Dataspace::UNKNOWN}; |
Chia-I Wu | cd8d7f0 | 2016-11-16 11:02:31 +0800 | [diff] [blame] | 307 | }; |
| 308 | |
| 309 | std::vector<CommandError> mErrors; |
| 310 | std::unordered_map<Display, ReturnData> mReturnData; |
| 311 | |
| 312 | // When SELECT_DISPLAY is parsed, this is updated to point to the |
| 313 | // display's return data in mReturnData. We use it to avoid repeated |
| 314 | // map lookups. |
| 315 | ReturnData* mCurrentReturnData; |
| 316 | }; |
| 317 | |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 318 | // Composer is a wrapper to IComposer, a proxy to server-side composer. |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 319 | class Composer final : public Hwc2::Composer { |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 320 | public: |
Chih-Hung Hsieh | 2274904 | 2018-12-20 15:50:39 -0800 | [diff] [blame] | 321 | explicit Composer(const std::string& serviceName); |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 322 | ~Composer() override; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 323 | |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 324 | std::vector<IComposer::Capability> getCapabilities() override; |
| 325 | std::string dumpDebugInfo() override; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 326 | |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 327 | void registerCallback(const sp<IComposerCallback>& callback) override; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 328 | |
Steven Thomas | 94e35b9 | 2017-07-26 18:48:28 -0700 | [diff] [blame] | 329 | // Returns true if the connected composer service is running in a remote |
| 330 | // process, false otherwise. This will return false if the service is |
| 331 | // configured in passthrough mode, for example. |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 332 | bool isRemote() override; |
Steven Thomas | 94e35b9 | 2017-07-26 18:48:28 -0700 | [diff] [blame] | 333 | |
Steven Thomas | 0af4b9f | 2017-04-26 14:34:01 -0700 | [diff] [blame] | 334 | // Reset all pending commands in the command buffer. Useful if you want to |
| 335 | // skip a frame but have already queued some commands. |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 336 | void resetCommands() override; |
Steven Thomas | 0af4b9f | 2017-04-26 14:34:01 -0700 | [diff] [blame] | 337 | |
Chia-I Wu | ae5a6b8 | 2017-10-10 09:09:22 -0700 | [diff] [blame] | 338 | // Explicitly flush all pending commands in the command buffer. |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 339 | Error executeCommands() override; |
Chia-I Wu | ae5a6b8 | 2017-10-10 09:09:22 -0700 | [diff] [blame] | 340 | |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 341 | uint32_t getMaxVirtualDisplayCount() override; |
| 342 | bool isUsingVrComposer() const override { return mIsUsingVrComposer; } |
| 343 | Error createVirtualDisplay(uint32_t width, uint32_t height, PixelFormat* format, |
| 344 | Display* outDisplay) override; |
| 345 | Error destroyVirtualDisplay(Display display) override; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 346 | |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 347 | Error acceptDisplayChanges(Display display) override; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 348 | |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 349 | Error createLayer(Display display, Layer* outLayer) override; |
| 350 | Error destroyLayer(Display display, Layer layer) override; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 351 | |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 352 | Error getActiveConfig(Display display, Config* outConfig) override; |
| 353 | Error getChangedCompositionTypes(Display display, std::vector<Layer>* outLayers, |
| 354 | std::vector<IComposerClient::Composition>* outTypes) override; |
| 355 | Error getColorModes(Display display, std::vector<ColorMode>* outModes) override; |
| 356 | Error getDisplayAttribute(Display display, Config config, IComposerClient::Attribute attribute, |
| 357 | int32_t* outValue) override; |
Chia-I Wu | 67e376d | 2016-12-19 11:36:22 +0800 | [diff] [blame] | 358 | Error getDisplayConfigs(Display display, std::vector<Config>* outConfigs); |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 359 | Error getDisplayName(Display display, std::string* outName) override; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 360 | |
Chia-I Wu | 67e376d | 2016-12-19 11:36:22 +0800 | [diff] [blame] | 361 | Error getDisplayRequests(Display display, uint32_t* outDisplayRequestMask, |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 362 | std::vector<Layer>* outLayers, |
| 363 | std::vector<uint32_t>* outLayerRequestMasks) override; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 364 | |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 365 | Error getDozeSupport(Display display, bool* outSupport) override; |
| 366 | Error getHdrCapabilities(Display display, std::vector<Hdr>* outTypes, float* outMaxLuminance, |
| 367 | float* outMaxAverageLuminance, float* outMinLuminance) override; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 368 | |
Chia-I Wu | 67e376d | 2016-12-19 11:36:22 +0800 | [diff] [blame] | 369 | Error getReleaseFences(Display display, std::vector<Layer>* outLayers, |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 370 | std::vector<int>* outReleaseFences) override; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 371 | |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 372 | Error presentDisplay(Display display, int* outPresentFence) override; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 373 | |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 374 | Error setActiveConfig(Display display, Config config) override; |
Chia-I Wu | 06d63de | 2017-01-04 14:58:51 +0800 | [diff] [blame] | 375 | |
| 376 | /* |
| 377 | * The composer caches client targets internally. When target is nullptr, |
| 378 | * the composer uses slot to look up the client target from its cache. |
| 379 | * When target is not nullptr, the cache is updated with the new target. |
| 380 | */ |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 381 | Error setClientTarget(Display display, uint32_t slot, const sp<GraphicBuffer>& target, |
| 382 | int acquireFence, Dataspace dataspace, |
| 383 | const std::vector<IComposerClient::Rect>& damage) override; |
Peiyong Lin | 0e7a791 | 2018-04-05 14:36:36 -0700 | [diff] [blame] | 384 | Error setColorMode(Display display, ColorMode mode, RenderIntent renderIntent) override; |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 385 | Error setColorTransform(Display display, const float* matrix, ColorTransform hint) override; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 386 | Error setOutputBuffer(Display display, const native_handle_t* buffer, |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 387 | int releaseFence) override; |
| 388 | Error setPowerMode(Display display, IComposerClient::PowerMode mode) override; |
| 389 | Error setVsyncEnabled(Display display, IComposerClient::Vsync enabled) override; |
Chia-I Wu | cd8d7f0 | 2016-11-16 11:02:31 +0800 | [diff] [blame] | 390 | |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 391 | Error setClientTargetSlotCount(Display display) override; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 392 | |
Chia-I Wu | 67e376d | 2016-12-19 11:36:22 +0800 | [diff] [blame] | 393 | Error validateDisplay(Display display, uint32_t* outNumTypes, |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 394 | uint32_t* outNumRequests) override; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 395 | |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 396 | Error presentOrValidateDisplay(Display display, uint32_t* outNumTypes, uint32_t* outNumRequests, |
| 397 | int* outPresentFence, uint32_t* state) override; |
Fabien Sanglard | 249c0ae | 2017-06-19 19:22:36 -0700 | [diff] [blame] | 398 | |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 399 | Error setCursorPosition(Display display, Layer layer, int32_t x, int32_t y) override; |
Chia-I Wu | 06d63de | 2017-01-04 14:58:51 +0800 | [diff] [blame] | 400 | /* see setClientTarget for the purpose of slot */ |
| 401 | Error setLayerBuffer(Display display, Layer layer, uint32_t slot, |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 402 | const sp<GraphicBuffer>& buffer, int acquireFence) override; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 403 | Error setLayerSurfaceDamage(Display display, Layer layer, |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 404 | const std::vector<IComposerClient::Rect>& damage) override; |
| 405 | Error setLayerBlendMode(Display display, Layer layer, IComposerClient::BlendMode mode) override; |
| 406 | Error setLayerColor(Display display, Layer layer, const IComposerClient::Color& color) override; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 407 | Error setLayerCompositionType(Display display, Layer layer, |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 408 | IComposerClient::Composition type) override; |
| 409 | Error setLayerDataspace(Display display, Layer layer, Dataspace dataspace) override; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 410 | Error setLayerDisplayFrame(Display display, Layer layer, |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 411 | const IComposerClient::Rect& frame) override; |
| 412 | Error setLayerPlaneAlpha(Display display, Layer layer, float alpha) override; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 413 | Error setLayerSidebandStream(Display display, Layer layer, |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 414 | const native_handle_t* stream) override; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 415 | Error setLayerSourceCrop(Display display, Layer layer, |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 416 | const IComposerClient::FRect& crop) override; |
| 417 | Error setLayerTransform(Display display, Layer layer, Transform transform) override; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 418 | Error setLayerVisibleRegion(Display display, Layer layer, |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 419 | const std::vector<IComposerClient::Rect>& visible) override; |
| 420 | Error setLayerZOrder(Display display, Layer layer, uint32_t z) override; |
| 421 | Error setLayerInfo(Display display, Layer layer, uint32_t type, uint32_t appId) override; |
| 422 | |
Peiyong Lin | 0e7a791 | 2018-04-05 14:36:36 -0700 | [diff] [blame] | 423 | // Composer HAL 2.2 |
Peiyong Lin | 0ac5f4e | 2018-04-19 22:06:34 -0700 | [diff] [blame] | 424 | Error setLayerPerFrameMetadata( |
| 425 | Display display, Layer layer, |
| 426 | const std::vector<IComposerClient::PerFrameMetadata>& perFrameMetadatas) override; |
Chia-I Wu | d7e01d7 | 2018-06-21 13:39:09 +0800 | [diff] [blame] | 427 | std::vector<IComposerClient::PerFrameMetadataKey> getPerFrameMetadataKeys( |
| 428 | Display display) override; |
Peiyong Lin | 0e7a791 | 2018-04-05 14:36:36 -0700 | [diff] [blame] | 429 | Error getRenderIntents(Display display, ColorMode colorMode, |
| 430 | std::vector<RenderIntent>* outRenderIntents) override; |
| 431 | Error getDataspaceSaturationMatrix(Dataspace dataspace, mat4* outMatrix) override; |
| 432 | |
Dominik Laskowski | e9ef7c4 | 2018-03-12 19:34:30 -0700 | [diff] [blame] | 433 | // Composer HAL 2.3 |
| 434 | Error getDisplayIdentificationData(Display display, uint8_t* outPort, |
| 435 | std::vector<uint8_t>* outData) override; |
Peiyong Lin | 698147a | 2018-09-14 13:27:18 -0700 | [diff] [blame] | 436 | Error setLayerColorTransform(Display display, Layer layer, const float* matrix) override; |
Kevin DuBois | 9c0a176 | 2018-10-16 13:32:31 -0700 | [diff] [blame] | 437 | Error getDisplayedContentSamplingAttributes(Display display, PixelFormat* outFormat, |
| 438 | Dataspace* outDataspace, |
| 439 | uint8_t* outComponentMask) override; |
Kevin DuBois | 74e5377 | 2018-11-19 10:52:38 -0800 | [diff] [blame] | 440 | Error setDisplayContentSamplingEnabled(Display display, bool enabled, uint8_t componentMask, |
| 441 | uint64_t maxFrames) override; |
Kevin DuBois | 1d4249a | 2018-08-29 10:45:14 -0700 | [diff] [blame] | 442 | Error getDisplayedContentSample(Display display, uint64_t maxFrames, uint64_t timestamp, |
| 443 | DisplayedFrameStats* outStats) override; |
Valerie Hau | e9e843a | 2018-12-18 13:39:23 -0800 | [diff] [blame] | 444 | Error setLayerPerFrameMetadataBlobs( |
| 445 | Display display, Layer layer, |
| 446 | const std::vector<IComposerClient::PerFrameMetadataBlob>& metadata) override; |
Dan Gittik | 57e63c5 | 2019-01-18 16:37:54 +0000 | [diff] [blame] | 447 | Error setDisplayBrightness(Display display, float brightness) override; |
Dominik Laskowski | e9ef7c4 | 2018-03-12 19:34:30 -0700 | [diff] [blame] | 448 | |
Dominik Laskowski | 25a4e7d | 2019-09-20 14:50:10 -0700 | [diff] [blame] | 449 | // Composer HAL 2.4 |
Ady Abraham | 7159f57 | 2019-10-11 11:10:18 -0700 | [diff] [blame] | 450 | bool isVsyncPeriodSwitchSupported() override { return mClient_2_4 != nullptr; } |
Dominik Laskowski | 25a4e7d | 2019-09-20 14:50:10 -0700 | [diff] [blame] | 451 | Error getDisplayCapabilities(Display display, |
| 452 | std::vector<DisplayCapability>* outCapabilities) override; |
Ady Abraham | 7159f57 | 2019-10-11 11:10:18 -0700 | [diff] [blame] | 453 | V2_4::Error getDisplayConnectionType(Display display, |
| 454 | IComposerClient::DisplayConnectionType* outType) override; |
| 455 | V2_4::Error getDisplayVsyncPeriod(Display display, VsyncPeriodNanos* outVsyncPeriod) override; |
| 456 | V2_4::Error setActiveConfigWithConstraints( |
| 457 | Display display, Config config, |
| 458 | const IComposerClient::VsyncPeriodChangeConstraints& vsyncPeriodChangeConstraints, |
| 459 | VsyncPeriodChangeTimeline* outTimeline) override; |
Galia Peycheva | 5492cb5 | 2019-10-30 14:13:16 +0100 | [diff] [blame] | 460 | V2_4::Error setAutoLowLatencyMode(Display displayId, bool on) override; |
| 461 | V2_4::Error getSupportedContentTypes( |
| 462 | Display displayId, |
| 463 | std::vector<IComposerClient::ContentType>* outSupportedContentTypes) override; |
| 464 | V2_4::Error setContentType(Display displayId, |
| 465 | IComposerClient::ContentType contentType) override; |
Dominik Laskowski | 25a4e7d | 2019-09-20 14:50:10 -0700 | [diff] [blame] | 466 | |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 467 | private: |
mamik | 94e91f6 | 2019-08-19 09:11:33 -0700 | [diff] [blame] | 468 | #if defined(USE_VR_COMPOSER) && USE_VR_COMPOSER |
Daniel Nicoara | 2f5f8a5 | 2016-12-20 16:11:58 -0500 | [diff] [blame] | 469 | class CommandWriter : public CommandWriterBase { |
| 470 | public: |
Chih-Hung Hsieh | 2274904 | 2018-12-20 15:50:39 -0800 | [diff] [blame] | 471 | explicit CommandWriter(uint32_t initialMaxSize); |
Daniel Nicoara | 2f5f8a5 | 2016-12-20 16:11:58 -0500 | [diff] [blame] | 472 | ~CommandWriter() override; |
| 473 | |
| 474 | void setLayerInfo(uint32_t type, uint32_t appId); |
Daniel Nicoara | 1f42e3a | 2017-04-10 13:27:32 -0400 | [diff] [blame] | 475 | void setClientTargetMetadata( |
| 476 | const IVrComposerClient::BufferMetadata& metadata); |
| 477 | void setLayerBufferMetadata( |
| 478 | const IVrComposerClient::BufferMetadata& metadata); |
| 479 | |
| 480 | private: |
| 481 | void writeBufferMetadata( |
| 482 | const IVrComposerClient::BufferMetadata& metadata); |
Daniel Nicoara | 2f5f8a5 | 2016-12-20 16:11:58 -0500 | [diff] [blame] | 483 | }; |
mamik | 94e91f6 | 2019-08-19 09:11:33 -0700 | [diff] [blame] | 484 | #else |
| 485 | class CommandWriter : public CommandWriterBase { |
| 486 | public: |
| 487 | explicit CommandWriter(uint32_t initialMaxSize) : CommandWriterBase(initialMaxSize) {} |
| 488 | ~CommandWriter() override {} |
| 489 | }; |
| 490 | #endif // defined(USE_VR_COMPOSER) && USE_VR_COMPOSER |
Daniel Nicoara | 2f5f8a5 | 2016-12-20 16:11:58 -0500 | [diff] [blame] | 491 | |
Chia-I Wu | cd8d7f0 | 2016-11-16 11:02:31 +0800 | [diff] [blame] | 492 | // Many public functions above simply write a command into the command |
| 493 | // queue to batch the calls. validateDisplay and presentDisplay will call |
| 494 | // this function to execute the command queue. |
| 495 | Error execute(); |
| 496 | |
Dominik Laskowski | 6231aaf | 2018-04-02 17:10:23 -0700 | [diff] [blame] | 497 | sp<V2_1::IComposer> mComposer; |
| 498 | |
| 499 | sp<V2_1::IComposerClient> mClient; |
Dominik Laskowski | e9ef7c4 | 2018-03-12 19:34:30 -0700 | [diff] [blame] | 500 | sp<V2_2::IComposerClient> mClient_2_2; |
Dominik Laskowski | 25a4e7d | 2019-09-20 14:50:10 -0700 | [diff] [blame] | 501 | sp<V2_3::IComposerClient> mClient_2_3; |
| 502 | sp<IComposerClient> mClient_2_4; |
Chia-I Wu | cd8d7f0 | 2016-11-16 11:02:31 +0800 | [diff] [blame] | 503 | |
| 504 | // 64KiB minus a small space for metadata such as read/write pointers |
| 505 | static constexpr size_t kWriterInitialSize = |
| 506 | 64 * 1024 / sizeof(uint32_t) - 16; |
Daniel Nicoara | 2f5f8a5 | 2016-12-20 16:11:58 -0500 | [diff] [blame] | 507 | CommandWriter mWriter; |
Chia-I Wu | cd8d7f0 | 2016-11-16 11:02:31 +0800 | [diff] [blame] | 508 | CommandReader mReader; |
Daniel Nicoara | 2f5f8a5 | 2016-12-20 16:11:58 -0500 | [diff] [blame] | 509 | |
Hendrik Wagenaar | 87670ff | 2017-02-01 12:10:46 -0800 | [diff] [blame] | 510 | // When true, the we attach to the vr_hwcomposer service instead of the |
| 511 | // hwcomposer. This allows us to redirect surfaces to 3d surfaces in vr. |
| 512 | const bool mIsUsingVrComposer; |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 513 | }; |
| 514 | |
Lloyd Pique | a822d52 | 2017-12-20 16:42:57 -0800 | [diff] [blame] | 515 | } // namespace impl |
| 516 | |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 517 | } // namespace Hwc2 |
| 518 | |
| 519 | } // namespace android |
| 520 | |
| 521 | #endif // ANDROID_SF_COMPOSER_HAL_H |