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 | #include <sstream> |
| 18 | |
| 19 | #include "Hwc2TestProperties.h" |
| 20 | |
Marissa Wall | c57468f | 2016-12-15 12:31:12 -0800 | [diff] [blame] | 21 | Hwc2TestBufferArea::Hwc2TestBufferArea(Hwc2TestCoverage coverage, |
| 22 | const Area& displayArea) |
| 23 | : Hwc2TestProperty(mBufferAreas), |
| 24 | mScalars((coverage == Hwc2TestCoverage::Complete)? mCompleteScalars: |
| 25 | (coverage == Hwc2TestCoverage::Basic)? mBasicScalars: |
| 26 | mDefaultScalars), |
| 27 | mDisplayArea(displayArea) |
| 28 | { |
| 29 | update(); |
| 30 | } |
| 31 | |
| 32 | std::string Hwc2TestBufferArea::dump() const |
| 33 | { |
| 34 | std::stringstream dmp; |
| 35 | const Area& curr = get(); |
| 36 | dmp << "\tbuffer area: width " << curr.width << ", height " << curr.height |
| 37 | << "\n"; |
| 38 | return dmp.str(); |
| 39 | } |
| 40 | |
| 41 | void Hwc2TestBufferArea::setDependent(Hwc2TestSourceCrop* sourceCrop) |
| 42 | { |
| 43 | mSourceCrop = sourceCrop; |
| 44 | updateDependents(); |
| 45 | } |
| 46 | |
| 47 | void Hwc2TestBufferArea::update() |
| 48 | { |
| 49 | mBufferAreas.clear(); |
| 50 | |
| 51 | if (mDisplayArea.width == 0 && mDisplayArea.height == 0) { |
| 52 | mBufferAreas.push_back({0, 0}); |
| 53 | return; |
| 54 | } |
| 55 | |
| 56 | for (auto scalar : mScalars) { |
| 57 | mBufferAreas.push_back({static_cast<int32_t>(scalar * mDisplayArea.width), |
| 58 | static_cast<int32_t>(scalar * mDisplayArea.height)}); |
| 59 | } |
| 60 | |
| 61 | updateDependents(); |
| 62 | } |
| 63 | |
| 64 | void Hwc2TestBufferArea::updateDependents() |
| 65 | { |
| 66 | const Area& curr = get(); |
| 67 | |
| 68 | if (mSourceCrop) |
| 69 | mSourceCrop->updateBufferArea(curr); |
| 70 | } |
| 71 | |
| 72 | const std::vector<float> Hwc2TestBufferArea::mDefaultScalars = { |
| 73 | 1.0f, |
| 74 | }; |
| 75 | |
| 76 | const std::vector<float> Hwc2TestBufferArea::mBasicScalars = { |
| 77 | 1.0f, 0.5f, |
| 78 | }; |
| 79 | |
| 80 | const std::vector<float> Hwc2TestBufferArea::mCompleteScalars = { |
| 81 | 1.0f, 0.75f, 0.5f |
| 82 | }; |
| 83 | |
| 84 | |
Marissa Wall | ffc67da | 2016-12-15 12:26:09 -0800 | [diff] [blame] | 85 | Hwc2TestBlendMode::Hwc2TestBlendMode(Hwc2TestCoverage coverage) |
| 86 | : Hwc2TestProperty(coverage, mCompleteBlendModes, mBasicBlendModes, |
| 87 | mDefaultBlendModes) { } |
| 88 | |
| 89 | std::string Hwc2TestBlendMode::dump() const |
| 90 | { |
| 91 | std::stringstream dmp; |
| 92 | dmp << "\tblend mode: " << getBlendModeName(get()) << "\n"; |
| 93 | return dmp.str(); |
| 94 | } |
| 95 | |
Marissa Wall | ee24278 | 2016-12-15 12:30:12 -0800 | [diff] [blame] | 96 | void Hwc2TestBlendMode::setDependent(Hwc2TestColor* color) |
| 97 | { |
| 98 | mColor = color; |
| 99 | updateDependents(); |
| 100 | } |
| 101 | |
| 102 | void Hwc2TestBlendMode::updateDependents() |
| 103 | { |
| 104 | if (mColor) |
| 105 | mColor->updateBlendMode(get()); |
| 106 | } |
| 107 | |
Marissa Wall | ffc67da | 2016-12-15 12:26:09 -0800 | [diff] [blame] | 108 | const std::vector<hwc2_blend_mode_t> Hwc2TestBlendMode::mDefaultBlendModes = { |
| 109 | HWC2_BLEND_MODE_NONE, |
| 110 | }; |
| 111 | |
| 112 | const std::vector<hwc2_blend_mode_t> Hwc2TestBlendMode::mBasicBlendModes = { |
| 113 | HWC2_BLEND_MODE_NONE, |
| 114 | HWC2_BLEND_MODE_PREMULTIPLIED, |
| 115 | }; |
| 116 | |
| 117 | const std::vector<hwc2_blend_mode_t> Hwc2TestBlendMode::mCompleteBlendModes = { |
| 118 | HWC2_BLEND_MODE_NONE, |
| 119 | HWC2_BLEND_MODE_PREMULTIPLIED, |
| 120 | HWC2_BLEND_MODE_COVERAGE, |
| 121 | }; |
| 122 | |
| 123 | |
Marissa Wall | ee24278 | 2016-12-15 12:30:12 -0800 | [diff] [blame] | 124 | Hwc2TestColor::Hwc2TestColor(Hwc2TestCoverage coverage, |
| 125 | hwc2_blend_mode_t blendMode) |
| 126 | : Hwc2TestProperty(mColors), |
| 127 | mBaseColors((coverage == Hwc2TestCoverage::Complete)? mCompleteBaseColors: |
| 128 | (coverage == Hwc2TestCoverage::Basic)? mBasicBaseColors: |
| 129 | mDefaultBaseColors), |
| 130 | mBlendMode(blendMode) |
| 131 | { |
| 132 | update(); |
| 133 | } |
| 134 | |
| 135 | std::string Hwc2TestColor::dump() const |
| 136 | { |
| 137 | std::stringstream dmp; |
| 138 | const hwc_color_t& color = get(); |
| 139 | dmp << "\tcolor: r " << std::to_string(color.r) << ", g " |
| 140 | << std::to_string(color.g) << ", b " << std::to_string(color.b) |
| 141 | << ", a " << std::to_string(color.a) << "\n"; |
| 142 | return dmp.str(); |
| 143 | } |
| 144 | |
| 145 | void Hwc2TestColor::updateBlendMode(hwc2_blend_mode_t blendMode) |
| 146 | { |
| 147 | mBlendMode = blendMode; |
| 148 | update(); |
| 149 | } |
| 150 | |
| 151 | void Hwc2TestColor::update() |
| 152 | { |
| 153 | if (mBlendMode != HWC2_BLEND_MODE_PREMULTIPLIED) { |
| 154 | mColors = mBaseColors; |
| 155 | return; |
| 156 | } |
| 157 | |
| 158 | mColors.clear(); |
| 159 | |
| 160 | for (const hwc_color_t& baseColor : mBaseColors) { |
| 161 | if (baseColor.a >= baseColor.r && baseColor.a >= baseColor.g |
| 162 | && baseColor.a >= baseColor.b) { |
| 163 | mColors.push_back(baseColor); |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | } |
| 168 | |
| 169 | const std::vector<hwc_color_t> Hwc2TestColor::mDefaultBaseColors = { |
| 170 | {UINT8_MAX, UINT8_MAX, UINT8_MAX, UINT8_MAX}, |
| 171 | }; |
| 172 | |
| 173 | const std::vector<hwc_color_t> Hwc2TestColor::mBasicBaseColors = { |
| 174 | {UINT8_MAX, UINT8_MAX, UINT8_MAX, UINT8_MAX}, |
| 175 | { 0, 0, 0, 0}, |
| 176 | }; |
| 177 | |
| 178 | const std::vector<hwc_color_t> Hwc2TestColor::mCompleteBaseColors = { |
| 179 | {UINT8_MAX, UINT8_MAX, UINT8_MAX, UINT8_MAX}, |
| 180 | {UINT8_MAX, UINT8_MAX, UINT8_MAX, 0}, |
| 181 | {UINT8_MAX, UINT8_MAX, 0, UINT8_MAX}, |
| 182 | {UINT8_MAX, UINT8_MAX, 0, 0}, |
| 183 | {UINT8_MAX, 0, UINT8_MAX, UINT8_MAX}, |
| 184 | {UINT8_MAX, 0, UINT8_MAX, 0}, |
| 185 | {UINT8_MAX, 0, 0, UINT8_MAX}, |
| 186 | {UINT8_MAX, 0, 0, 0}, |
| 187 | { 0, UINT8_MAX, UINT8_MAX, UINT8_MAX}, |
| 188 | { 0, UINT8_MAX, UINT8_MAX, 0}, |
| 189 | { 0, UINT8_MAX, 0, UINT8_MAX}, |
| 190 | { 0, UINT8_MAX, 0, 0}, |
| 191 | { 0, 0, UINT8_MAX, UINT8_MAX}, |
| 192 | { 0, 0, UINT8_MAX, 0}, |
| 193 | { 0, 0, 0, UINT8_MAX}, |
| 194 | { 0, 0, 0, 0}, |
| 195 | }; |
| 196 | |
| 197 | |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 198 | Hwc2TestComposition::Hwc2TestComposition(Hwc2TestCoverage coverage) |
Marissa Wall | ffc67da | 2016-12-15 12:26:09 -0800 | [diff] [blame] | 199 | : Hwc2TestProperty(coverage, mCompleteCompositions, mBasicCompositions, |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 200 | mDefaultCompositions) { } |
| 201 | |
| 202 | std::string Hwc2TestComposition::dump() const |
| 203 | { |
| 204 | std::stringstream dmp; |
| 205 | dmp << "\tcomposition: " << getCompositionName(get()) << "\n"; |
| 206 | return dmp.str(); |
| 207 | } |
| 208 | |
| 209 | const std::vector<hwc2_composition_t> Hwc2TestComposition::mDefaultCompositions = { |
| 210 | HWC2_COMPOSITION_DEVICE, |
| 211 | }; |
| 212 | |
| 213 | const std::vector<hwc2_composition_t> Hwc2TestComposition::mBasicCompositions = { |
| 214 | HWC2_COMPOSITION_CLIENT, |
| 215 | HWC2_COMPOSITION_DEVICE, |
| 216 | }; |
| 217 | |
| 218 | const std::vector<hwc2_composition_t> Hwc2TestComposition::mCompleteCompositions = { |
| 219 | HWC2_COMPOSITION_CLIENT, |
| 220 | HWC2_COMPOSITION_DEVICE, |
| 221 | HWC2_COMPOSITION_SOLID_COLOR, |
| 222 | HWC2_COMPOSITION_CURSOR, |
| 223 | HWC2_COMPOSITION_SIDEBAND, |
| 224 | }; |
Marissa Wall | b72b5c9 | 2016-12-15 12:26:39 -0800 | [diff] [blame] | 225 | |
| 226 | |
| 227 | Hwc2TestDataspace::Hwc2TestDataspace(Hwc2TestCoverage coverage) |
| 228 | : Hwc2TestProperty(coverage, completeDataspaces, basicDataspaces, |
| 229 | defaultDataspaces) { } |
| 230 | |
| 231 | std::string Hwc2TestDataspace::dump() const |
| 232 | { |
| 233 | std::stringstream dmp; |
| 234 | dmp << "\tdataspace: " << get() << "\n"; |
| 235 | return dmp.str(); |
| 236 | } |
| 237 | |
| 238 | const std::vector<android_dataspace_t> Hwc2TestDataspace::defaultDataspaces = { |
| 239 | HAL_DATASPACE_UNKNOWN, |
| 240 | }; |
| 241 | |
| 242 | const std::vector<android_dataspace_t> Hwc2TestDataspace::basicDataspaces = { |
| 243 | HAL_DATASPACE_UNKNOWN, |
| 244 | HAL_DATASPACE_V0_SRGB, |
| 245 | }; |
| 246 | |
| 247 | const std::vector<android_dataspace_t> Hwc2TestDataspace::completeDataspaces = { |
| 248 | HAL_DATASPACE_UNKNOWN, |
| 249 | HAL_DATASPACE_ARBITRARY, |
| 250 | HAL_DATASPACE_STANDARD_SHIFT, |
| 251 | HAL_DATASPACE_STANDARD_MASK, |
| 252 | HAL_DATASPACE_STANDARD_UNSPECIFIED, |
| 253 | HAL_DATASPACE_STANDARD_BT709, |
| 254 | HAL_DATASPACE_STANDARD_BT601_625, |
| 255 | HAL_DATASPACE_STANDARD_BT601_625_UNADJUSTED, |
| 256 | HAL_DATASPACE_STANDARD_BT601_525, |
| 257 | HAL_DATASPACE_STANDARD_BT601_525_UNADJUSTED, |
| 258 | HAL_DATASPACE_STANDARD_BT2020, |
| 259 | HAL_DATASPACE_STANDARD_BT2020_CONSTANT_LUMINANCE, |
| 260 | HAL_DATASPACE_STANDARD_BT470M, |
| 261 | HAL_DATASPACE_STANDARD_FILM, |
| 262 | HAL_DATASPACE_TRANSFER_SHIFT, |
| 263 | HAL_DATASPACE_TRANSFER_MASK, |
| 264 | HAL_DATASPACE_TRANSFER_UNSPECIFIED, |
| 265 | HAL_DATASPACE_TRANSFER_LINEAR, |
| 266 | HAL_DATASPACE_TRANSFER_SRGB, |
| 267 | HAL_DATASPACE_TRANSFER_SMPTE_170M, |
| 268 | HAL_DATASPACE_TRANSFER_GAMMA2_2, |
| 269 | HAL_DATASPACE_TRANSFER_GAMMA2_8, |
| 270 | HAL_DATASPACE_TRANSFER_ST2084, |
| 271 | HAL_DATASPACE_TRANSFER_HLG, |
| 272 | HAL_DATASPACE_RANGE_SHIFT, |
| 273 | HAL_DATASPACE_RANGE_MASK, |
| 274 | HAL_DATASPACE_RANGE_UNSPECIFIED, |
| 275 | HAL_DATASPACE_RANGE_FULL, |
| 276 | HAL_DATASPACE_RANGE_LIMITED, |
| 277 | HAL_DATASPACE_SRGB_LINEAR, |
| 278 | HAL_DATASPACE_V0_SRGB_LINEAR, |
| 279 | HAL_DATASPACE_SRGB, |
| 280 | HAL_DATASPACE_V0_SRGB, |
| 281 | HAL_DATASPACE_JFIF, |
| 282 | HAL_DATASPACE_V0_JFIF, |
| 283 | HAL_DATASPACE_BT601_625, |
| 284 | HAL_DATASPACE_V0_BT601_625, |
| 285 | HAL_DATASPACE_BT601_525, |
| 286 | HAL_DATASPACE_V0_BT601_525, |
| 287 | HAL_DATASPACE_BT709, |
| 288 | HAL_DATASPACE_V0_BT709, |
| 289 | HAL_DATASPACE_DEPTH, |
| 290 | }; |
Marissa Wall | 2b1f530 | 2016-12-15 12:27:20 -0800 | [diff] [blame] | 291 | |
| 292 | |
Marissa Wall | 600a73b | 2016-12-15 12:30:39 -0800 | [diff] [blame] | 293 | Hwc2TestDisplayFrame::Hwc2TestDisplayFrame(Hwc2TestCoverage coverage, |
| 294 | const Area& displayArea) |
| 295 | : Hwc2TestProperty(mDisplayFrames), |
| 296 | mFrectScalars((coverage == Hwc2TestCoverage::Complete)? mCompleteFrectScalars: |
| 297 | (coverage == Hwc2TestCoverage::Basic)? mBasicFrectScalars: |
| 298 | mDefaultFrectScalars), |
| 299 | mDisplayArea(displayArea) |
| 300 | { |
| 301 | update(); |
| 302 | } |
| 303 | |
| 304 | std::string Hwc2TestDisplayFrame::dump() const |
| 305 | { |
| 306 | std::stringstream dmp; |
| 307 | const hwc_rect_t& displayFrame = get(); |
| 308 | dmp << "\tdisplay frame: left " << displayFrame.left << ", top " |
| 309 | << displayFrame.top << ", right " << displayFrame.right |
| 310 | << ", bottom " << displayFrame.bottom << "\n"; |
| 311 | return dmp.str(); |
| 312 | } |
| 313 | |
| 314 | void Hwc2TestDisplayFrame::update() |
| 315 | { |
| 316 | mDisplayFrames.clear(); |
| 317 | |
| 318 | if (mDisplayArea.width == 0 && mDisplayArea.height == 0) { |
| 319 | mDisplayFrames.push_back({0, 0, 0, 0}); |
| 320 | return; |
| 321 | } |
| 322 | |
| 323 | for (const auto& frectScalar : mFrectScalars) { |
| 324 | mDisplayFrames.push_back({ |
| 325 | static_cast<int>(frectScalar.left * mDisplayArea.width), |
| 326 | static_cast<int>(frectScalar.top * mDisplayArea.height), |
| 327 | static_cast<int>(frectScalar.right * mDisplayArea.width), |
| 328 | static_cast<int>(frectScalar.bottom * mDisplayArea.height)}); |
| 329 | } |
| 330 | } |
| 331 | |
| 332 | const std::vector<hwc_frect_t> Hwc2TestDisplayFrame::mDefaultFrectScalars = { |
| 333 | {0.0, 0.0, 1.0, 1.0}, |
| 334 | }; |
| 335 | |
| 336 | const std::vector<hwc_frect_t> Hwc2TestDisplayFrame::mBasicFrectScalars = { |
| 337 | {0.0, 0.0, 1.0, 1.0}, |
| 338 | {0.0, 0.0, 1.0, 0.05}, |
| 339 | {0.0, 0.95, 1.0, 1.0}, |
| 340 | }; |
| 341 | |
| 342 | const std::vector<hwc_frect_t> Hwc2TestDisplayFrame::mCompleteFrectScalars = { |
| 343 | {0.0, 0.0, 1.0, 1.0}, |
| 344 | {0.0, 0.05, 1.0, 0.95}, |
| 345 | {0.0, 0.05, 1.0, 1.0}, |
| 346 | {0.0, 0.0, 1.0, 0.05}, |
| 347 | {0.0, 0.95, 1.0, 1.0}, |
| 348 | {0.25, 0.0, 0.75, 0.35}, |
| 349 | {0.25, 0.25, 0.75, 0.75}, |
| 350 | }; |
| 351 | |
| 352 | |
Marissa Wall | 2b1f530 | 2016-12-15 12:27:20 -0800 | [diff] [blame] | 353 | Hwc2TestPlaneAlpha::Hwc2TestPlaneAlpha(Hwc2TestCoverage coverage) |
| 354 | : Hwc2TestProperty(coverage, mCompletePlaneAlphas, mBasicPlaneAlphas, |
| 355 | mDefaultPlaneAlphas) { } |
| 356 | |
| 357 | std::string Hwc2TestPlaneAlpha::dump() const |
| 358 | { |
| 359 | std::stringstream dmp; |
| 360 | dmp << "\tplane alpha: " << get() << "\n"; |
| 361 | return dmp.str(); |
| 362 | } |
| 363 | |
| 364 | const std::vector<float> Hwc2TestPlaneAlpha::mDefaultPlaneAlphas = { |
| 365 | 1.0f, |
| 366 | }; |
| 367 | |
| 368 | const std::vector<float> Hwc2TestPlaneAlpha::mBasicPlaneAlphas = { |
| 369 | 1.0f, 0.0f, |
| 370 | }; |
| 371 | |
| 372 | const std::vector<float> Hwc2TestPlaneAlpha::mCompletePlaneAlphas = { |
| 373 | 1.0f, 0.75f, 0.5f, 0.25f, 0.0f, |
| 374 | }; |
Marissa Wall | ac10819 | 2016-12-15 12:27:48 -0800 | [diff] [blame] | 375 | |
| 376 | |
Marissa Wall | c57468f | 2016-12-15 12:31:12 -0800 | [diff] [blame] | 377 | Hwc2TestSourceCrop::Hwc2TestSourceCrop(Hwc2TestCoverage coverage, |
| 378 | const Area& bufferArea) |
| 379 | : Hwc2TestProperty(mSourceCrops), |
| 380 | mFrectScalars((coverage == Hwc2TestCoverage::Complete)? mCompleteFrectScalars: |
| 381 | (coverage == Hwc2TestCoverage::Basic)? mBasicFrectScalars: |
| 382 | mDefaultFrectScalars), |
| 383 | mBufferArea(bufferArea) |
| 384 | { |
| 385 | update(); |
| 386 | } |
| 387 | |
| 388 | std::string Hwc2TestSourceCrop::dump() const |
| 389 | { |
| 390 | std::stringstream dmp; |
| 391 | const hwc_frect_t& sourceCrop = get(); |
| 392 | dmp << "\tsource crop: left " << sourceCrop.left << ", top " |
| 393 | << sourceCrop.top << ", right " << sourceCrop.right << ", bottom " |
| 394 | << sourceCrop.bottom << "\n"; |
| 395 | return dmp.str(); |
| 396 | } |
| 397 | |
| 398 | void Hwc2TestSourceCrop::updateBufferArea(const Area& bufferArea) |
| 399 | { |
| 400 | mBufferArea = bufferArea; |
| 401 | update(); |
| 402 | } |
| 403 | |
| 404 | void Hwc2TestSourceCrop::update() |
| 405 | { |
| 406 | mSourceCrops.clear(); |
| 407 | |
| 408 | if (mBufferArea.width == 0 && mBufferArea.height == 0) { |
| 409 | mSourceCrops.push_back({0, 0, 0, 0}); |
| 410 | return; |
| 411 | } |
| 412 | |
| 413 | for (const auto& frectScalar : mFrectScalars) { |
| 414 | mSourceCrops.push_back({ |
| 415 | frectScalar.left * mBufferArea.width, |
| 416 | frectScalar.top * mBufferArea.height, |
| 417 | frectScalar.right * mBufferArea.width, |
| 418 | frectScalar.bottom * mBufferArea.height}); |
| 419 | } |
| 420 | } |
| 421 | |
| 422 | const std::vector<hwc_frect_t> Hwc2TestSourceCrop::mDefaultFrectScalars = { |
| 423 | {0.0, 0.0, 1.0, 1.0}, |
| 424 | }; |
| 425 | |
| 426 | const std::vector<hwc_frect_t> Hwc2TestSourceCrop::mBasicFrectScalars = { |
| 427 | {0.0, 0.0, 1.0, 1.0}, |
| 428 | {0.0, 0.0, 0.5, 0.5}, |
| 429 | {0.5, 0.5, 1.0, 1.0}, |
| 430 | }; |
| 431 | |
| 432 | const std::vector<hwc_frect_t> Hwc2TestSourceCrop::mCompleteFrectScalars = { |
| 433 | {0.0, 0.0, 1.0, 1.0}, |
| 434 | {0.0, 0.0, 0.5, 0.5}, |
| 435 | {0.5, 0.5, 1.0, 1.0}, |
| 436 | {0.0, 0.0, 0.25, 0.25}, |
| 437 | {0.25, 0.25, 0.75, 0.75}, |
| 438 | }; |
| 439 | |
| 440 | |
Marissa Wall | ac10819 | 2016-12-15 12:27:48 -0800 | [diff] [blame] | 441 | Hwc2TestTransform::Hwc2TestTransform(Hwc2TestCoverage coverage) |
| 442 | : Hwc2TestProperty(coverage, mCompleteTransforms, mBasicTransforms, |
| 443 | mDefaultTransforms) { } |
| 444 | |
| 445 | std::string Hwc2TestTransform::dump() const |
| 446 | { |
| 447 | std::stringstream dmp; |
| 448 | dmp << "\ttransform: " << getTransformName(get()) << "\n"; |
| 449 | return dmp.str(); |
| 450 | } |
| 451 | |
| 452 | const std::vector<hwc_transform_t> Hwc2TestTransform::mDefaultTransforms = { |
| 453 | static_cast<hwc_transform_t>(0), |
| 454 | }; |
| 455 | |
| 456 | const std::vector<hwc_transform_t> Hwc2TestTransform::mBasicTransforms = { |
| 457 | static_cast<hwc_transform_t>(0), |
| 458 | HWC_TRANSFORM_FLIP_H, |
| 459 | HWC_TRANSFORM_FLIP_V, |
| 460 | HWC_TRANSFORM_ROT_90, |
| 461 | }; |
| 462 | |
| 463 | const std::vector<hwc_transform_t> Hwc2TestTransform::mCompleteTransforms = { |
| 464 | static_cast<hwc_transform_t>(0), |
| 465 | HWC_TRANSFORM_FLIP_H, |
| 466 | HWC_TRANSFORM_FLIP_V, |
| 467 | HWC_TRANSFORM_ROT_90, |
| 468 | HWC_TRANSFORM_ROT_180, |
| 469 | HWC_TRANSFORM_ROT_270, |
| 470 | HWC_TRANSFORM_FLIP_H_ROT_90, |
| 471 | HWC_TRANSFORM_FLIP_V_ROT_90, |
| 472 | }; |