Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 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 _HWC2_TEST_PROPERTIES_H |
| 18 | #define _HWC2_TEST_PROPERTIES_H |
| 19 | |
Marissa Wall | ffc67da | 2016-12-15 12:26:09 -0800 | [diff] [blame] | 20 | #include <array> |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 21 | #include <vector> |
| 22 | |
Marissa Wall | f7618ed | 2016-12-15 12:34:39 -0800 | [diff] [blame] | 23 | #include <ui/Region.h> |
| 24 | |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 25 | #define HWC2_INCLUDE_STRINGIFICATION |
| 26 | #define HWC2_USE_CPP11 |
| 27 | #include <hardware/hwcomposer2.h> |
| 28 | #undef HWC2_INCLUDE_STRINGIFICATION |
| 29 | #undef HWC2_USE_CPP11 |
| 30 | |
| 31 | enum class Hwc2TestCoverage { |
| 32 | Default = 0, |
| 33 | Basic, |
| 34 | Complete, |
| 35 | }; |
| 36 | |
Marissa Wall | 563030b | 2017-02-21 14:01:05 -0800 | [diff] [blame] | 37 | enum class Hwc2TestPropertyName { |
| 38 | BlendMode = 1, |
| 39 | BufferArea, |
| 40 | Color, |
| 41 | Composition, |
| 42 | CursorPosition, |
| 43 | Dataspace, |
| 44 | DisplayFrame, |
| 45 | PlaneAlpha, |
| 46 | SourceCrop, |
| 47 | SurfaceDamage, |
| 48 | Transform, |
| 49 | }; |
| 50 | |
Marissa Wall | 600a73b | 2016-12-15 12:30:39 -0800 | [diff] [blame] | 51 | typedef struct { |
| 52 | int32_t width; |
| 53 | int32_t height; |
| 54 | } Area; |
| 55 | |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 56 | |
Marissa Wall | bad1bc7 | 2017-02-21 14:33:46 -0800 | [diff] [blame] | 57 | typedef struct { |
| 58 | uint32_t width; |
| 59 | uint32_t height; |
| 60 | } UnsignedArea; |
| 61 | |
| 62 | |
Marissa Wall | ffc67da | 2016-12-15 12:26:09 -0800 | [diff] [blame] | 63 | class Hwc2TestContainer { |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 64 | public: |
Marissa Wall | ffc67da | 2016-12-15 12:26:09 -0800 | [diff] [blame] | 65 | virtual ~Hwc2TestContainer() = default; |
| 66 | |
| 67 | /* Resets the container */ |
| 68 | virtual void reset() = 0; |
| 69 | |
| 70 | /* Attempts to advance to the next valid value. Returns true if one can be |
| 71 | * found */ |
| 72 | virtual bool advance() = 0; |
| 73 | |
| 74 | virtual std::string dump() const = 0; |
Marissa Wall | 1cd789c | 2017-01-27 12:55:36 -0800 | [diff] [blame] | 75 | |
| 76 | /* Returns true if the container supports the given composition type */ |
| 77 | virtual bool isSupported(hwc2_composition_t composition) = 0; |
Marissa Wall | ffc67da | 2016-12-15 12:26:09 -0800 | [diff] [blame] | 78 | }; |
| 79 | |
| 80 | |
| 81 | template <class T> |
| 82 | class Hwc2TestProperty : public Hwc2TestContainer { |
| 83 | public: |
| 84 | Hwc2TestProperty(Hwc2TestCoverage coverage, |
| 85 | const std::vector<T>& completeList, const std::vector<T>& basicList, |
Marissa Wall | 1cd789c | 2017-01-27 12:55:36 -0800 | [diff] [blame] | 86 | const std::vector<T>& defaultList, |
| 87 | const std::array<bool, 6>& compositionSupport) |
Marissa Wall | ffc67da | 2016-12-15 12:26:09 -0800 | [diff] [blame] | 88 | : Hwc2TestProperty((coverage == Hwc2TestCoverage::Complete)? completeList: |
Marissa Wall | 1cd789c | 2017-01-27 12:55:36 -0800 | [diff] [blame] | 89 | (coverage == Hwc2TestCoverage::Basic)? basicList : defaultList, |
| 90 | compositionSupport) { } |
Marissa Wall | ffc67da | 2016-12-15 12:26:09 -0800 | [diff] [blame] | 91 | |
Marissa Wall | 1cd789c | 2017-01-27 12:55:36 -0800 | [diff] [blame] | 92 | Hwc2TestProperty(const std::vector<T>& list, |
| 93 | const std::array<bool, 6>& compositionSupport) |
| 94 | : mList(list), |
| 95 | mCompositionSupport(compositionSupport) { } |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 96 | |
Marissa Wall | ffc67da | 2016-12-15 12:26:09 -0800 | [diff] [blame] | 97 | void reset() override |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 98 | { |
| 99 | mListIdx = 0; |
| 100 | } |
| 101 | |
Marissa Wall | ffc67da | 2016-12-15 12:26:09 -0800 | [diff] [blame] | 102 | bool advance() override |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 103 | { |
| 104 | if (mListIdx + 1 < mList.size()) { |
| 105 | mListIdx++; |
Marissa Wall | c57468f | 2016-12-15 12:31:12 -0800 | [diff] [blame] | 106 | updateDependents(); |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 107 | return true; |
| 108 | } |
| 109 | reset(); |
Marissa Wall | c57468f | 2016-12-15 12:31:12 -0800 | [diff] [blame] | 110 | updateDependents(); |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 111 | return false; |
| 112 | } |
| 113 | |
Marissa Wall | ffc67da | 2016-12-15 12:26:09 -0800 | [diff] [blame] | 114 | T get() const |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 115 | { |
| 116 | return mList.at(mListIdx); |
| 117 | } |
| 118 | |
Marissa Wall | 1cd789c | 2017-01-27 12:55:36 -0800 | [diff] [blame] | 119 | virtual bool isSupported(hwc2_composition_t composition) |
| 120 | { |
| 121 | return mCompositionSupport.at(composition); |
| 122 | } |
| 123 | |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 124 | protected: |
Marissa Wall | c57468f | 2016-12-15 12:31:12 -0800 | [diff] [blame] | 125 | /* If a derived class has dependents, override this function */ |
| 126 | virtual void updateDependents() { } |
| 127 | |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 128 | const std::vector<T>& mList; |
| 129 | size_t mListIdx = 0; |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 130 | |
Marissa Wall | 1cd789c | 2017-01-27 12:55:36 -0800 | [diff] [blame] | 131 | const std::array<bool, 6>& mCompositionSupport; |
| 132 | }; |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 133 | |
Marissa Wall | 5a240aa | 2016-12-15 12:34:06 -0800 | [diff] [blame] | 134 | class Hwc2TestBuffer; |
Marissa Wall | c57468f | 2016-12-15 12:31:12 -0800 | [diff] [blame] | 135 | class Hwc2TestSourceCrop; |
Marissa Wall | ad76181 | 2016-12-15 12:32:24 -0800 | [diff] [blame] | 136 | class Hwc2TestSurfaceDamage; |
Marissa Wall | c57468f | 2016-12-15 12:31:12 -0800 | [diff] [blame] | 137 | |
| 138 | class Hwc2TestBufferArea : public Hwc2TestProperty<Area> { |
| 139 | public: |
| 140 | Hwc2TestBufferArea(Hwc2TestCoverage coverage, const Area& displayArea); |
| 141 | |
| 142 | std::string dump() const override; |
| 143 | |
Marissa Wall | 5a240aa | 2016-12-15 12:34:06 -0800 | [diff] [blame] | 144 | void setDependent(Hwc2TestBuffer* buffer); |
Marissa Wall | c57468f | 2016-12-15 12:31:12 -0800 | [diff] [blame] | 145 | void setDependent(Hwc2TestSourceCrop* sourceCrop); |
Marissa Wall | ad76181 | 2016-12-15 12:32:24 -0800 | [diff] [blame] | 146 | void setDependent(Hwc2TestSurfaceDamage* surfaceDamage); |
Marissa Wall | c57468f | 2016-12-15 12:31:12 -0800 | [diff] [blame] | 147 | |
| 148 | protected: |
| 149 | void update(); |
| 150 | void updateDependents() override; |
| 151 | |
| 152 | const std::vector<float>& mScalars; |
| 153 | static const std::vector<float> mDefaultScalars; |
| 154 | static const std::vector<float> mBasicScalars; |
| 155 | static const std::vector<float> mCompleteScalars; |
| 156 | |
| 157 | Area mDisplayArea; |
| 158 | |
Marissa Wall | 5a240aa | 2016-12-15 12:34:06 -0800 | [diff] [blame] | 159 | Hwc2TestBuffer* mBuffer = nullptr; |
Marissa Wall | c57468f | 2016-12-15 12:31:12 -0800 | [diff] [blame] | 160 | Hwc2TestSourceCrop* mSourceCrop = nullptr; |
Marissa Wall | ad76181 | 2016-12-15 12:32:24 -0800 | [diff] [blame] | 161 | Hwc2TestSurfaceDamage* mSurfaceDamage = nullptr; |
Marissa Wall | c57468f | 2016-12-15 12:31:12 -0800 | [diff] [blame] | 162 | |
| 163 | std::vector<Area> mBufferAreas; |
Marissa Wall | 1cd789c | 2017-01-27 12:55:36 -0800 | [diff] [blame] | 164 | |
| 165 | static const std::array<bool, 6> mCompositionSupport; |
Marissa Wall | c57468f | 2016-12-15 12:31:12 -0800 | [diff] [blame] | 166 | }; |
| 167 | |
| 168 | |
Marissa Wall | ee24278 | 2016-12-15 12:30:12 -0800 | [diff] [blame] | 169 | class Hwc2TestColor; |
| 170 | |
Marissa Wall | ffc67da | 2016-12-15 12:26:09 -0800 | [diff] [blame] | 171 | class Hwc2TestBlendMode : public Hwc2TestProperty<hwc2_blend_mode_t> { |
| 172 | public: |
| 173 | Hwc2TestBlendMode(Hwc2TestCoverage coverage); |
| 174 | |
| 175 | std::string dump() const override; |
| 176 | |
Marissa Wall | ee24278 | 2016-12-15 12:30:12 -0800 | [diff] [blame] | 177 | void setDependent(Hwc2TestColor* color); |
| 178 | |
Marissa Wall | ffc67da | 2016-12-15 12:26:09 -0800 | [diff] [blame] | 179 | protected: |
Marissa Wall | ee24278 | 2016-12-15 12:30:12 -0800 | [diff] [blame] | 180 | void updateDependents() override; |
| 181 | |
| 182 | Hwc2TestColor* mColor = nullptr; |
| 183 | |
Marissa Wall | ffc67da | 2016-12-15 12:26:09 -0800 | [diff] [blame] | 184 | static const std::vector<hwc2_blend_mode_t> mDefaultBlendModes; |
| 185 | static const std::vector<hwc2_blend_mode_t> mBasicBlendModes; |
| 186 | static const std::vector<hwc2_blend_mode_t> mCompleteBlendModes; |
Marissa Wall | 1cd789c | 2017-01-27 12:55:36 -0800 | [diff] [blame] | 187 | |
| 188 | static const std::array<bool, 6> mCompositionSupport; |
Marissa Wall | ffc67da | 2016-12-15 12:26:09 -0800 | [diff] [blame] | 189 | }; |
| 190 | |
| 191 | |
Marissa Wall | ee24278 | 2016-12-15 12:30:12 -0800 | [diff] [blame] | 192 | class Hwc2TestColor : public Hwc2TestProperty<hwc_color_t> { |
| 193 | public: |
| 194 | Hwc2TestColor(Hwc2TestCoverage coverage, |
| 195 | hwc2_blend_mode_t blendMode = HWC2_BLEND_MODE_NONE); |
| 196 | |
| 197 | std::string dump() const override; |
| 198 | |
| 199 | void updateBlendMode(hwc2_blend_mode_t blendMode); |
| 200 | |
| 201 | protected: |
| 202 | void update(); |
| 203 | |
| 204 | std::vector<hwc_color_t> mBaseColors; |
| 205 | static const std::vector<hwc_color_t> mDefaultBaseColors; |
| 206 | static const std::vector<hwc_color_t> mBasicBaseColors; |
| 207 | static const std::vector<hwc_color_t> mCompleteBaseColors; |
| 208 | |
| 209 | hwc2_blend_mode_t mBlendMode; |
| 210 | |
| 211 | std::vector<hwc_color_t> mColors; |
Marissa Wall | 1cd789c | 2017-01-27 12:55:36 -0800 | [diff] [blame] | 212 | |
| 213 | static const std::array<bool, 6> mCompositionSupport; |
Marissa Wall | ee24278 | 2016-12-15 12:30:12 -0800 | [diff] [blame] | 214 | }; |
| 215 | |
| 216 | |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 217 | class Hwc2TestComposition : public Hwc2TestProperty<hwc2_composition_t> { |
| 218 | public: |
| 219 | Hwc2TestComposition(Hwc2TestCoverage coverage); |
| 220 | |
| 221 | std::string dump() const override; |
| 222 | |
| 223 | protected: |
| 224 | static const std::vector<hwc2_composition_t> mDefaultCompositions; |
| 225 | static const std::vector<hwc2_composition_t> mBasicCompositions; |
| 226 | static const std::vector<hwc2_composition_t> mCompleteCompositions; |
Marissa Wall | 1cd789c | 2017-01-27 12:55:36 -0800 | [diff] [blame] | 227 | |
| 228 | static const std::array<bool, 6> mCompositionSupport; |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 229 | }; |
| 230 | |
Marissa Wall | b72b5c9 | 2016-12-15 12:26:39 -0800 | [diff] [blame] | 231 | |
| 232 | class Hwc2TestDataspace : public Hwc2TestProperty<android_dataspace_t> { |
| 233 | public: |
| 234 | Hwc2TestDataspace(Hwc2TestCoverage coverage); |
| 235 | |
| 236 | std::string dump() const override; |
| 237 | |
| 238 | protected: |
| 239 | static const std::vector<android_dataspace_t> defaultDataspaces; |
| 240 | static const std::vector<android_dataspace_t> basicDataspaces; |
| 241 | static const std::vector<android_dataspace_t> completeDataspaces; |
Marissa Wall | 1cd789c | 2017-01-27 12:55:36 -0800 | [diff] [blame] | 242 | |
| 243 | static const std::array<bool, 6> mCompositionSupport; |
Marissa Wall | b72b5c9 | 2016-12-15 12:26:39 -0800 | [diff] [blame] | 244 | }; |
| 245 | |
David Hanna Jr | 3f05602 | 2017-07-27 19:19:15 -0700 | [diff] [blame^] | 246 | class Hwc2TestVirtualBuffer; |
Marissa Wall | 2b1f530 | 2016-12-15 12:27:20 -0800 | [diff] [blame] | 247 | |
Marissa Wall | bad1bc7 | 2017-02-21 14:33:46 -0800 | [diff] [blame] | 248 | class Hwc2TestDisplayDimension : public Hwc2TestProperty<UnsignedArea> { |
| 249 | public: |
| 250 | Hwc2TestDisplayDimension(Hwc2TestCoverage coverage); |
| 251 | |
| 252 | std::string dump() const; |
| 253 | |
David Hanna Jr | 3f05602 | 2017-07-27 19:19:15 -0700 | [diff] [blame^] | 254 | void setDependent(Hwc2TestVirtualBuffer* buffer); |
Marissa Wall | bad1bc7 | 2017-02-21 14:33:46 -0800 | [diff] [blame] | 255 | |
| 256 | private: |
| 257 | void updateDependents(); |
| 258 | |
David Hanna Jr | 3f05602 | 2017-07-27 19:19:15 -0700 | [diff] [blame^] | 259 | std::set<Hwc2TestVirtualBuffer*> mBuffers; |
Marissa Wall | bad1bc7 | 2017-02-21 14:33:46 -0800 | [diff] [blame] | 260 | |
| 261 | static const std::vector<UnsignedArea> mDefaultDisplayDimensions; |
| 262 | static const std::vector<UnsignedArea> mBasicDisplayDimensions; |
| 263 | static const std::vector<UnsignedArea> mCompleteDisplayDimensions; |
| 264 | |
| 265 | static const std::array<bool, 6> mCompositionSupport; |
| 266 | }; |
| 267 | |
| 268 | |
Marissa Wall | 600a73b | 2016-12-15 12:30:39 -0800 | [diff] [blame] | 269 | class Hwc2TestDisplayFrame : public Hwc2TestProperty<hwc_rect_t> { |
| 270 | public: |
| 271 | Hwc2TestDisplayFrame(Hwc2TestCoverage coverage, const Area& displayArea); |
| 272 | |
| 273 | std::string dump() const override; |
| 274 | |
| 275 | protected: |
| 276 | void update(); |
| 277 | |
| 278 | const std::vector<hwc_frect_t>& mFrectScalars; |
| 279 | const static std::vector<hwc_frect_t> mDefaultFrectScalars; |
| 280 | const static std::vector<hwc_frect_t> mBasicFrectScalars; |
| 281 | const static std::vector<hwc_frect_t> mCompleteFrectScalars; |
| 282 | |
| 283 | Area mDisplayArea; |
| 284 | |
| 285 | std::vector<hwc_rect_t> mDisplayFrames; |
Marissa Wall | 1cd789c | 2017-01-27 12:55:36 -0800 | [diff] [blame] | 286 | |
| 287 | static const std::array<bool, 6> mCompositionSupport; |
Marissa Wall | 600a73b | 2016-12-15 12:30:39 -0800 | [diff] [blame] | 288 | }; |
| 289 | |
| 290 | |
Marissa Wall | 2b1f530 | 2016-12-15 12:27:20 -0800 | [diff] [blame] | 291 | class Hwc2TestPlaneAlpha : public Hwc2TestProperty<float> { |
| 292 | public: |
| 293 | Hwc2TestPlaneAlpha(Hwc2TestCoverage coverage); |
| 294 | |
| 295 | std::string dump() const override; |
| 296 | |
| 297 | protected: |
| 298 | static const std::vector<float> mDefaultPlaneAlphas; |
| 299 | static const std::vector<float> mBasicPlaneAlphas; |
| 300 | static const std::vector<float> mCompletePlaneAlphas; |
Marissa Wall | 1cd789c | 2017-01-27 12:55:36 -0800 | [diff] [blame] | 301 | |
| 302 | static const std::array<bool, 6> mCompositionSupport; |
Marissa Wall | 2b1f530 | 2016-12-15 12:27:20 -0800 | [diff] [blame] | 303 | }; |
| 304 | |
Marissa Wall | ac10819 | 2016-12-15 12:27:48 -0800 | [diff] [blame] | 305 | |
Marissa Wall | c57468f | 2016-12-15 12:31:12 -0800 | [diff] [blame] | 306 | class Hwc2TestSourceCrop : public Hwc2TestProperty<hwc_frect_t> { |
| 307 | public: |
| 308 | Hwc2TestSourceCrop(Hwc2TestCoverage coverage, const Area& bufferArea = {0, 0}); |
| 309 | |
| 310 | std::string dump() const override; |
| 311 | |
| 312 | void updateBufferArea(const Area& bufferArea); |
| 313 | |
| 314 | protected: |
| 315 | void update(); |
| 316 | |
| 317 | const std::vector<hwc_frect_t>& mFrectScalars; |
| 318 | const static std::vector<hwc_frect_t> mDefaultFrectScalars; |
| 319 | const static std::vector<hwc_frect_t> mBasicFrectScalars; |
| 320 | const static std::vector<hwc_frect_t> mCompleteFrectScalars; |
| 321 | |
| 322 | Area mBufferArea; |
| 323 | |
| 324 | std::vector<hwc_frect_t> mSourceCrops; |
Marissa Wall | 1cd789c | 2017-01-27 12:55:36 -0800 | [diff] [blame] | 325 | |
| 326 | static const std::array<bool, 6> mCompositionSupport; |
Marissa Wall | c57468f | 2016-12-15 12:31:12 -0800 | [diff] [blame] | 327 | }; |
| 328 | |
| 329 | |
Marissa Wall | ad76181 | 2016-12-15 12:32:24 -0800 | [diff] [blame] | 330 | class Hwc2TestSurfaceDamage : public Hwc2TestProperty<hwc_region_t> { |
| 331 | public: |
| 332 | Hwc2TestSurfaceDamage(Hwc2TestCoverage coverage); |
| 333 | ~Hwc2TestSurfaceDamage(); |
| 334 | |
| 335 | std::string dump() const override; |
| 336 | |
| 337 | void updateBufferArea(const Area& bufferArea); |
| 338 | |
| 339 | protected: |
| 340 | void update(); |
| 341 | void freeSurfaceDamages(); |
| 342 | |
| 343 | const std::vector<std::vector<hwc_frect_t>> &mRegionScalars; |
| 344 | const static std::vector<std::vector<hwc_frect_t>> mDefaultRegionScalars; |
| 345 | const static std::vector<std::vector<hwc_frect_t>> mBasicRegionScalars; |
| 346 | const static std::vector<std::vector<hwc_frect_t>> mCompleteRegionScalars; |
| 347 | |
| 348 | Area mBufferArea = {0, 0}; |
| 349 | |
| 350 | std::vector<hwc_region_t> mSurfaceDamages; |
Marissa Wall | 1cd789c | 2017-01-27 12:55:36 -0800 | [diff] [blame] | 351 | |
| 352 | static const std::array<bool, 6> mCompositionSupport; |
Marissa Wall | ad76181 | 2016-12-15 12:32:24 -0800 | [diff] [blame] | 353 | }; |
| 354 | |
| 355 | |
Marissa Wall | ac10819 | 2016-12-15 12:27:48 -0800 | [diff] [blame] | 356 | class Hwc2TestTransform : public Hwc2TestProperty<hwc_transform_t> { |
| 357 | public: |
| 358 | Hwc2TestTransform(Hwc2TestCoverage coverage); |
| 359 | |
| 360 | std::string dump() const override; |
| 361 | |
| 362 | protected: |
| 363 | static const std::vector<hwc_transform_t> mDefaultTransforms; |
| 364 | static const std::vector<hwc_transform_t> mBasicTransforms; |
| 365 | static const std::vector<hwc_transform_t> mCompleteTransforms; |
Marissa Wall | 1cd789c | 2017-01-27 12:55:36 -0800 | [diff] [blame] | 366 | |
| 367 | static const std::array<bool, 6> mCompositionSupport; |
Marissa Wall | ac10819 | 2016-12-15 12:27:48 -0800 | [diff] [blame] | 368 | }; |
| 369 | |
Marissa Wall | f7618ed | 2016-12-15 12:34:39 -0800 | [diff] [blame] | 370 | |
| 371 | class Hwc2TestVisibleRegion { |
| 372 | public: |
| 373 | ~Hwc2TestVisibleRegion(); |
| 374 | |
| 375 | std::string dump() const; |
| 376 | |
| 377 | void set(const android::Region& visibleRegion); |
| 378 | hwc_region_t get() const; |
| 379 | void release(); |
| 380 | |
| 381 | protected: |
| 382 | hwc_region_t mVisibleRegion = {0, nullptr}; |
| 383 | }; |
| 384 | |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 385 | #endif /* ifndef _HWC2_TEST_PROPERTIES_H */ |