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 | |
| 21 | Hwc2TestComposition::Hwc2TestComposition(Hwc2TestCoverage coverage) |
| 22 | : Hwc2TestProperty( |
| 23 | (coverage == Hwc2TestCoverage::Complete)? mCompleteCompositions: |
| 24 | (coverage == Hwc2TestCoverage::Basic)? mBasicCompositions: |
| 25 | mDefaultCompositions) { } |
| 26 | |
| 27 | std::string Hwc2TestComposition::dump() const |
| 28 | { |
| 29 | std::stringstream dmp; |
| 30 | dmp << "\tcomposition: " << getCompositionName(get()) << "\n"; |
| 31 | return dmp.str(); |
| 32 | } |
| 33 | |
| 34 | const std::vector<hwc2_composition_t> Hwc2TestComposition::mDefaultCompositions = { |
| 35 | HWC2_COMPOSITION_DEVICE, |
| 36 | }; |
| 37 | |
| 38 | const std::vector<hwc2_composition_t> Hwc2TestComposition::mBasicCompositions = { |
| 39 | HWC2_COMPOSITION_CLIENT, |
| 40 | HWC2_COMPOSITION_DEVICE, |
| 41 | }; |
| 42 | |
| 43 | const std::vector<hwc2_composition_t> Hwc2TestComposition::mCompleteCompositions = { |
| 44 | HWC2_COMPOSITION_CLIENT, |
| 45 | HWC2_COMPOSITION_DEVICE, |
| 46 | HWC2_COMPOSITION_SOLID_COLOR, |
| 47 | HWC2_COMPOSITION_CURSOR, |
| 48 | HWC2_COMPOSITION_SIDEBAND, |
| 49 | }; |