blob: ee0e8d4f2b03a6296adef3724bbded551e1c5dc4 [file] [log] [blame]
Marissa Wall6bd8bfd2016-12-15 12:25:31 -08001/*
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 Wallffc67da2016-12-15 12:26:09 -080021Hwc2TestBlendMode::Hwc2TestBlendMode(Hwc2TestCoverage coverage)
22 : Hwc2TestProperty(coverage, mCompleteBlendModes, mBasicBlendModes,
23 mDefaultBlendModes) { }
24
25std::string Hwc2TestBlendMode::dump() const
26{
27 std::stringstream dmp;
28 dmp << "\tblend mode: " << getBlendModeName(get()) << "\n";
29 return dmp.str();
30}
31
32const std::vector<hwc2_blend_mode_t> Hwc2TestBlendMode::mDefaultBlendModes = {
33 HWC2_BLEND_MODE_NONE,
34};
35
36const std::vector<hwc2_blend_mode_t> Hwc2TestBlendMode::mBasicBlendModes = {
37 HWC2_BLEND_MODE_NONE,
38 HWC2_BLEND_MODE_PREMULTIPLIED,
39};
40
41const 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 Wall6bd8bfd2016-12-15 12:25:31 -080048Hwc2TestComposition::Hwc2TestComposition(Hwc2TestCoverage coverage)
Marissa Wallffc67da2016-12-15 12:26:09 -080049 : Hwc2TestProperty(coverage, mCompleteCompositions, mBasicCompositions,
Marissa Wall6bd8bfd2016-12-15 12:25:31 -080050 mDefaultCompositions) { }
51
52std::string Hwc2TestComposition::dump() const
53{
54 std::stringstream dmp;
55 dmp << "\tcomposition: " << getCompositionName(get()) << "\n";
56 return dmp.str();
57}
58
59const std::vector<hwc2_composition_t> Hwc2TestComposition::mDefaultCompositions = {
60 HWC2_COMPOSITION_DEVICE,
61};
62
63const std::vector<hwc2_composition_t> Hwc2TestComposition::mBasicCompositions = {
64 HWC2_COMPOSITION_CLIENT,
65 HWC2_COMPOSITION_DEVICE,
66};
67
68const 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};