blob: 948c0c90bf8bafb701699147852f9a42f58935b1 [file] [log] [blame]
Lloyd Pique32cbe282018-10-19 13:09:22 -07001/*
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
Dominik Laskowski0acc3842022-04-07 11:23:42 -070017#include <ftl/enum.h>
18
Lloyd Pique32cbe282018-10-19 13:09:22 -070019#include <compositionengine/impl/DumpHelpers.h>
20#include <compositionengine/impl/OutputCompositionState.h>
21
22namespace android::compositionengine::impl {
23
24void OutputCompositionState::dump(std::string& out) const {
Lloyd Pique207def92019-02-28 16:09:52 -080025 out.append(" ");
Lloyd Pique32cbe282018-10-19 13:09:22 -070026 dumpVal(out, "isEnabled", isEnabled);
27 dumpVal(out, "isSecure", isSecure);
Lloyd Pique66d68602019-02-13 14:23:31 -080028 dumpVal(out, "usesDeviceComposition", usesDeviceComposition);
Dominik Laskowski0acc3842022-04-07 11:23:42 -070029
30 out.append("\n ");
31 dumpVal(out, "usesClientComposition", usesClientComposition);
Lloyd Pique66d68602019-02-13 14:23:31 -080032 dumpVal(out, "flipClientTarget", flipClientTarget);
Vishnu Nair9b079a22020-01-21 14:36:08 -080033 dumpVal(out, "reusedClientComposition", reusedClientComposition);
Lloyd Pique32cbe282018-10-19 13:09:22 -070034
35 out.append("\n ");
Dominik Laskowski0acc3842022-04-07 11:23:42 -070036 dumpVal(out, "layerFilter", layerFilter);
37 out.append("\n ");
Lloyd Pique32cbe282018-10-19 13:09:22 -070038 dumpVal(out, "transform", transform);
39
Dominik Laskowski0acc3842022-04-07 11:23:42 -070040 out.append(" "); // ui::Transform::dump appends EOL.
Marin Shalamanov6ad317c2020-07-29 23:34:07 +020041 dumpVal(out, "layerStackSpace", to_string(layerStackSpace));
42 out.append("\n ");
Marin Shalamanovb15d2272020-09-17 21:41:52 +020043 dumpVal(out, "framebufferSpace", to_string(framebufferSpace));
44 out.append("\n ");
Marin Shalamanov6ad317c2020-07-29 23:34:07 +020045 dumpVal(out, "orientedDisplaySpace", to_string(orientedDisplaySpace));
46 out.append("\n ");
47 dumpVal(out, "displaySpace", to_string(displaySpace));
48 out.append("\n ");
Lloyd Pique32cbe282018-10-19 13:09:22 -070049 dumpVal(out, "needsFiltering", needsFiltering);
50
Lloyd Pique207def92019-02-28 16:09:52 -080051 out.append("\n ");
Lloyd Pique32cbe282018-10-19 13:09:22 -070052 dumpVal(out, "colorMode", toString(colorMode), colorMode);
53 dumpVal(out, "renderIntent", toString(renderIntent), renderIntent);
54 dumpVal(out, "dataspace", toString(dataspace), dataspace);
Dominik Laskowski0acc3842022-04-07 11:23:42 -070055 dumpVal(out, "targetDataspace", toString(targetDataspace), targetDataspace);
56
57 out.append("\n ");
Lloyd Pique3eb1b212019-03-07 21:15:40 -080058 dumpVal(out, "colorTransformMatrix", colorTransformMatrix);
Dominik Laskowski0acc3842022-04-07 11:23:42 -070059
60 out.append("\n ");
Alec Mouric6f31012022-02-11 12:24:52 -080061 dumpVal(out, "displayBrightnessNits", displayBrightnessNits);
62 dumpVal(out, "sdrWhitePointNits", sdrWhitePointNits);
63 dumpVal(out, "clientTargetBrightness", clientTargetBrightness);
64 dumpVal(out, "displayBrightness", displayBrightness);
Lloyd Pique32cbe282018-10-19 13:09:22 -070065
Dominik Laskowski0acc3842022-04-07 11:23:42 -070066 out.append("\n ");
67 dumpVal(out, "compositionStrategyPredictionState", ftl::enum_string(strategyPrediction));
68
Alec Mouridda07d92022-04-25 22:39:25 +000069 out.append("\n ");
70 dumpVal(out, "treate170mAsSrgb", treat170mAsSrgb);
71
Dominik Laskowski0acc3842022-04-07 11:23:42 -070072 out += '\n';
Lloyd Pique32cbe282018-10-19 13:09:22 -070073}
74
75} // namespace android::compositionengine::impl