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 | ffc67da | 2016-12-15 12:26:09 -0800 | [diff] [blame^] | 21 | Hwc2TestBlendMode::Hwc2TestBlendMode(Hwc2TestCoverage coverage) |
| 22 | : Hwc2TestProperty(coverage, mCompleteBlendModes, mBasicBlendModes, |
| 23 | mDefaultBlendModes) { } |
| 24 | |
| 25 | std::string Hwc2TestBlendMode::dump() const |
| 26 | { |
| 27 | std::stringstream dmp; |
| 28 | dmp << "\tblend mode: " << getBlendModeName(get()) << "\n"; |
| 29 | return dmp.str(); |
| 30 | } |
| 31 | |
| 32 | const std::vector<hwc2_blend_mode_t> Hwc2TestBlendMode::mDefaultBlendModes = { |
| 33 | HWC2_BLEND_MODE_NONE, |
| 34 | }; |
| 35 | |
| 36 | const std::vector<hwc2_blend_mode_t> Hwc2TestBlendMode::mBasicBlendModes = { |
| 37 | HWC2_BLEND_MODE_NONE, |
| 38 | HWC2_BLEND_MODE_PREMULTIPLIED, |
| 39 | }; |
| 40 | |
| 41 | const std::vector<hwc2_blend_mode_t> Hwc2TestBlendMode::mCompleteBlendModes = { |
| 42 | HWC2_BLEND_MODE_NONE, |
| 43 | HWC2_BLEND_MODE_PREMULTIPLIED, |
| 44 | HWC2_BLEND_MODE_COVERAGE, |
| 45 | }; |
| 46 | |
| 47 | |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 48 | Hwc2TestComposition::Hwc2TestComposition(Hwc2TestCoverage coverage) |
Marissa Wall | ffc67da | 2016-12-15 12:26:09 -0800 | [diff] [blame^] | 49 | : Hwc2TestProperty(coverage, mCompleteCompositions, mBasicCompositions, |
Marissa Wall | 6bd8bfd | 2016-12-15 12:25:31 -0800 | [diff] [blame] | 50 | mDefaultCompositions) { } |
| 51 | |
| 52 | std::string Hwc2TestComposition::dump() const |
| 53 | { |
| 54 | std::stringstream dmp; |
| 55 | dmp << "\tcomposition: " << getCompositionName(get()) << "\n"; |
| 56 | return dmp.str(); |
| 57 | } |
| 58 | |
| 59 | const std::vector<hwc2_composition_t> Hwc2TestComposition::mDefaultCompositions = { |
| 60 | HWC2_COMPOSITION_DEVICE, |
| 61 | }; |
| 62 | |
| 63 | const std::vector<hwc2_composition_t> Hwc2TestComposition::mBasicCompositions = { |
| 64 | HWC2_COMPOSITION_CLIENT, |
| 65 | HWC2_COMPOSITION_DEVICE, |
| 66 | }; |
| 67 | |
| 68 | const std::vector<hwc2_composition_t> Hwc2TestComposition::mCompleteCompositions = { |
| 69 | HWC2_COMPOSITION_CLIENT, |
| 70 | HWC2_COMPOSITION_DEVICE, |
| 71 | HWC2_COMPOSITION_SOLID_COLOR, |
| 72 | HWC2_COMPOSITION_CURSOR, |
| 73 | HWC2_COMPOSITION_SIDEBAND, |
| 74 | }; |