blob: cc3c54c8b132f9566e0f2cbb01e2213a1fa29f91 [file] [log] [blame]
Lloyd Pique37c2c9b2018-12-04 17:25:10 -08001/*
2 * Copyright 2019 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 <compositionengine/impl/DumpHelpers.h>
18#include <compositionengine/impl/OutputLayerCompositionState.h>
19
20#include "DisplayHardware/HWC2.h"
21
22namespace android::compositionengine::impl {
23
24namespace {
25
26void dumpHwc(const OutputLayerCompositionState::Hwc& hwc, std::string& out) {
27 out.append("\n hwc: ");
28
29 if (hwc.hwcLayer == nullptr) {
30 out.append("No layer ");
31 } else {
32 dumpHex(out, "layer", hwc.hwcLayer->getId());
33 }
34
35 dumpVal(out, "composition", toString(hwc.hwcCompositionType), hwc.hwcCompositionType);
36}
37
38} // namespace
39
40void OutputLayerCompositionState::dump(std::string& out) const {
41 out.append(" ");
42 dumpVal(out, "visibleRegion", visibleRegion);
43
44 out.append(" ");
Lloyd Piquea2468662019-03-07 21:31:06 -080045 dumpVal(out, "visibleNonTransparentRegion", visibleNonTransparentRegion);
46
47 out.append(" ");
48 dumpVal(out, "coveredRegion", coveredRegion);
49
50 out.append(" ");
51 dumpVal(out, "output visibleRegion", outputSpaceVisibleRegion);
52
53 out.append(" ");
Vishnu Naira483b4a2019-12-12 15:07:52 -080054 dumpVal(out, "shadowRegion", shadowRegion);
55
56 out.append(" ");
Lloyd Pique37c2c9b2018-12-04 17:25:10 -080057 dumpVal(out, "forceClientComposition", forceClientComposition);
58 dumpVal(out, "clearClientTarget", clearClientTarget);
59 dumpVal(out, "displayFrame", displayFrame);
60 dumpVal(out, "sourceCrop", sourceCrop);
Lloyd Pique207def92019-02-28 16:09:52 -080061 dumpVal(out, "bufferTransform", toString(bufferTransform), bufferTransform);
Lloyd Piquef5275482019-01-29 18:42:42 -080062 dumpVal(out, "dataspace", toString(dataspace), dataspace);
Lloyd Pique37c2c9b2018-12-04 17:25:10 -080063 dumpVal(out, "z-index", z);
64
65 if (hwc) {
66 dumpHwc(*hwc, out);
67 }
68
69 out.append("\n");
70}
71
72} // namespace android::compositionengine::impl