blob: eddb67f45bf067dba1eb554ccd939aaf4a128da3 [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
17#include <cmath>
18
Lloyd Pique56eba802019-08-28 15:45:25 -070019#include <compositionengine/impl/LayerCompositionState.h>
Lloyd Pique32cbe282018-10-19 13:09:22 -070020#include <compositionengine/impl/Output.h>
Lloyd Pique66d68602019-02-13 14:23:31 -080021#include <compositionengine/impl/OutputCompositionState.h>
Lloyd Pique56eba802019-08-28 15:45:25 -070022#include <compositionengine/impl/OutputLayerCompositionState.h>
Lloyd Pique32cbe282018-10-19 13:09:22 -070023#include <compositionengine/mock/CompositionEngine.h>
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070024#include <compositionengine/mock/DisplayColorProfile.h>
Lloyd Piquecc01a452018-12-04 17:24:00 -080025#include <compositionengine/mock/Layer.h>
26#include <compositionengine/mock/LayerFE.h>
27#include <compositionengine/mock/OutputLayer.h>
Lloyd Pique31cb2942018-10-19 17:23:03 -070028#include <compositionengine/mock/RenderSurface.h>
Lloyd Pique32cbe282018-10-19 13:09:22 -070029#include <gtest/gtest.h>
Lloyd Pique56eba802019-08-28 15:45:25 -070030#include <renderengine/mock/RenderEngine.h>
Lloyd Pique32cbe282018-10-19 13:09:22 -070031#include <ui/Rect.h>
32#include <ui/Region.h>
33
34#include "RegionMatcher.h"
35#include "TransformMatcher.h"
36
37namespace android::compositionengine {
38namespace {
39
Lloyd Pique56eba802019-08-28 15:45:25 -070040using testing::_;
Lloyd Pique31cb2942018-10-19 17:23:03 -070041using testing::Return;
Lloyd Pique32cbe282018-10-19 13:09:22 -070042using testing::ReturnRef;
43using testing::StrictMock;
44
Lloyd Pique56eba802019-08-28 15:45:25 -070045constexpr auto TR_IDENT = 0u;
46constexpr auto TR_ROT_90 = HAL_TRANSFORM_ROT_90;
47
Lloyd Pique66d68602019-02-13 14:23:31 -080048struct OutputTest : public testing::Test {
Lloyd Pique31cb2942018-10-19 17:23:03 -070049 OutputTest() {
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070050 mOutput.setDisplayColorProfileForTest(
51 std::unique_ptr<DisplayColorProfile>(mDisplayColorProfile));
Lloyd Pique31cb2942018-10-19 17:23:03 -070052 mOutput.setRenderSurfaceForTest(std::unique_ptr<RenderSurface>(mRenderSurface));
Lloyd Piqueef958122019-02-05 18:00:12 -080053
54 mOutput.editState().bounds = kDefaultDisplaySize;
Lloyd Pique31cb2942018-10-19 17:23:03 -070055 }
Lloyd Pique32cbe282018-10-19 13:09:22 -070056
Lloyd Piqueef958122019-02-05 18:00:12 -080057 static const Rect kDefaultDisplaySize;
58
Lloyd Pique32cbe282018-10-19 13:09:22 -070059 StrictMock<mock::CompositionEngine> mCompositionEngine;
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070060 mock::DisplayColorProfile* mDisplayColorProfile = new StrictMock<mock::DisplayColorProfile>();
Lloyd Pique31cb2942018-10-19 17:23:03 -070061 mock::RenderSurface* mRenderSurface = new StrictMock<mock::RenderSurface>();
Lloyd Pique32cbe282018-10-19 13:09:22 -070062 impl::Output mOutput{mCompositionEngine};
63};
64
Lloyd Piqueef958122019-02-05 18:00:12 -080065const Rect OutputTest::kDefaultDisplaySize{100, 200};
66
Lloyd Pique66d68602019-02-13 14:23:31 -080067/*
Lloyd Pique32cbe282018-10-19 13:09:22 -070068 * Basic construction
69 */
70
Lloyd Pique31cb2942018-10-19 17:23:03 -070071TEST_F(OutputTest, canInstantiateOutput) {
72 // The validation check checks each required component.
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070073 EXPECT_CALL(*mDisplayColorProfile, isValid()).WillOnce(Return(true));
Lloyd Pique31cb2942018-10-19 17:23:03 -070074 EXPECT_CALL(*mRenderSurface, isValid()).WillOnce(Return(true));
75
76 EXPECT_TRUE(mOutput.isValid());
77
78 // If we take away the required components, it is no longer valid.
79 mOutput.setRenderSurfaceForTest(std::unique_ptr<RenderSurface>());
80
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070081 EXPECT_CALL(*mDisplayColorProfile, isValid()).WillOnce(Return(true));
82
Lloyd Pique31cb2942018-10-19 17:23:03 -070083 EXPECT_FALSE(mOutput.isValid());
84}
Lloyd Pique32cbe282018-10-19 13:09:22 -070085
Lloyd Pique66d68602019-02-13 14:23:31 -080086/*
Lloyd Pique32cbe282018-10-19 13:09:22 -070087 * Output::setCompositionEnabled()
88 */
89
90TEST_F(OutputTest, setCompositionEnabledDoesNothingIfAlreadyEnabled) {
Lloyd Pique32cbe282018-10-19 13:09:22 -070091 mOutput.editState().isEnabled = true;
92
93 mOutput.setCompositionEnabled(true);
94
95 EXPECT_TRUE(mOutput.getState().isEnabled);
96 EXPECT_THAT(mOutput.getState().dirtyRegion, RegionEq(Region()));
97}
98
99TEST_F(OutputTest, setCompositionEnabledSetsEnabledAndDirtiesEntireOutput) {
Lloyd Pique32cbe282018-10-19 13:09:22 -0700100 mOutput.editState().isEnabled = false;
101
102 mOutput.setCompositionEnabled(true);
103
104 EXPECT_TRUE(mOutput.getState().isEnabled);
Lloyd Piqueef958122019-02-05 18:00:12 -0800105 EXPECT_THAT(mOutput.getState().dirtyRegion, RegionEq(Region(kDefaultDisplaySize)));
Lloyd Pique32cbe282018-10-19 13:09:22 -0700106}
107
108TEST_F(OutputTest, setCompositionEnabledSetsDisabledAndDirtiesEntireOutput) {
Lloyd Pique32cbe282018-10-19 13:09:22 -0700109 mOutput.editState().isEnabled = true;
110
111 mOutput.setCompositionEnabled(false);
112
113 EXPECT_FALSE(mOutput.getState().isEnabled);
Lloyd Piqueef958122019-02-05 18:00:12 -0800114 EXPECT_THAT(mOutput.getState().dirtyRegion, RegionEq(Region(kDefaultDisplaySize)));
Lloyd Pique32cbe282018-10-19 13:09:22 -0700115}
116
Lloyd Pique66d68602019-02-13 14:23:31 -0800117/*
Lloyd Pique32cbe282018-10-19 13:09:22 -0700118 * Output::setProjection()
119 */
120
121TEST_F(OutputTest, setProjectionTriviallyWorks) {
122 const ui::Transform transform{ui::Transform::ROT_180};
123 const int32_t orientation = 123;
124 const Rect frame{1, 2, 3, 4};
125 const Rect viewport{5, 6, 7, 8};
126 const Rect scissor{9, 10, 11, 12};
127 const bool needsFiltering = true;
128
129 mOutput.setProjection(transform, orientation, frame, viewport, scissor, needsFiltering);
130
131 EXPECT_THAT(mOutput.getState().transform, TransformEq(transform));
132 EXPECT_EQ(orientation, mOutput.getState().orientation);
133 EXPECT_EQ(frame, mOutput.getState().frame);
134 EXPECT_EQ(viewport, mOutput.getState().viewport);
135 EXPECT_EQ(scissor, mOutput.getState().scissor);
136 EXPECT_EQ(needsFiltering, mOutput.getState().needsFiltering);
137}
138
Lloyd Pique66d68602019-02-13 14:23:31 -0800139/*
Lloyd Pique32cbe282018-10-19 13:09:22 -0700140 * Output::setBounds()
141 */
142
143TEST_F(OutputTest, setBoundsSetsSizeAndDirtiesEntireOutput) {
Lloyd Piqueef958122019-02-05 18:00:12 -0800144 const ui::Size displaySize{200, 400};
Lloyd Pique31cb2942018-10-19 17:23:03 -0700145
146 EXPECT_CALL(*mRenderSurface, setDisplaySize(displaySize)).Times(1);
147 EXPECT_CALL(*mRenderSurface, getSize()).WillOnce(ReturnRef(displaySize));
148
Lloyd Pique32cbe282018-10-19 13:09:22 -0700149 mOutput.setBounds(displaySize);
150
Lloyd Pique31cb2942018-10-19 17:23:03 -0700151 EXPECT_EQ(Rect(displaySize), mOutput.getState().bounds);
Lloyd Pique32cbe282018-10-19 13:09:22 -0700152
Lloyd Pique31cb2942018-10-19 17:23:03 -0700153 EXPECT_THAT(mOutput.getState().dirtyRegion, RegionEq(Region(Rect(displaySize))));
Lloyd Pique32cbe282018-10-19 13:09:22 -0700154}
155
Lloyd Pique66d68602019-02-13 14:23:31 -0800156/*
Lloyd Pique32cbe282018-10-19 13:09:22 -0700157 * Output::setLayerStackFilter()
158 */
159
160TEST_F(OutputTest, setLayerStackFilterSetsFilterAndDirtiesEntireOutput) {
Lloyd Pique32cbe282018-10-19 13:09:22 -0700161 const uint32_t layerStack = 123u;
Lloyd Piqueef36b002019-01-23 17:52:04 -0800162 mOutput.setLayerStackFilter(layerStack, true);
Lloyd Pique32cbe282018-10-19 13:09:22 -0700163
Lloyd Piqueef36b002019-01-23 17:52:04 -0800164 EXPECT_TRUE(mOutput.getState().layerStackInternal);
165 EXPECT_EQ(layerStack, mOutput.getState().layerStackId);
Lloyd Pique32cbe282018-10-19 13:09:22 -0700166
Lloyd Piqueef958122019-02-05 18:00:12 -0800167 EXPECT_THAT(mOutput.getState().dirtyRegion, RegionEq(Region(kDefaultDisplaySize)));
Lloyd Pique32cbe282018-10-19 13:09:22 -0700168}
169
Lloyd Pique66d68602019-02-13 14:23:31 -0800170/*
Lloyd Pique32cbe282018-10-19 13:09:22 -0700171 * Output::setColorTransform
172 */
173
174TEST_F(OutputTest, setColorTransformSetsTransform) {
175 // Identity matrix sets an identity state value
176 const mat4 identity;
177
178 mOutput.setColorTransform(identity);
179
180 EXPECT_EQ(HAL_COLOR_TRANSFORM_IDENTITY, mOutput.getState().colorTransform);
Lloyd Pique77f79a22019-04-29 15:55:40 -0700181 EXPECT_EQ(identity, mOutput.getState().colorTransformMat);
Lloyd Pique32cbe282018-10-19 13:09:22 -0700182
Lloyd Piqueef958122019-02-05 18:00:12 -0800183 // Since identity is the default, the dirty region should be unchanged (empty)
184 EXPECT_THAT(mOutput.getState().dirtyRegion, RegionEq(Region()));
185
Lloyd Pique32cbe282018-10-19 13:09:22 -0700186 // Non-identity matrix sets a non-identity state value
Lloyd Pique77f79a22019-04-29 15:55:40 -0700187 const mat4 nonIdentityHalf = mat4() * 0.5;
Lloyd Pique32cbe282018-10-19 13:09:22 -0700188
Lloyd Pique77f79a22019-04-29 15:55:40 -0700189 mOutput.setColorTransform(nonIdentityHalf);
Lloyd Pique32cbe282018-10-19 13:09:22 -0700190
191 EXPECT_EQ(HAL_COLOR_TRANSFORM_ARBITRARY_MATRIX, mOutput.getState().colorTransform);
Lloyd Pique77f79a22019-04-29 15:55:40 -0700192 EXPECT_EQ(nonIdentityHalf, mOutput.getState().colorTransformMat);
193
194 // Since this is a state change, the entire output should now be dirty.
195 EXPECT_THAT(mOutput.getState().dirtyRegion, RegionEq(Region(kDefaultDisplaySize)));
196
197 // Non-identity matrix sets a non-identity state value
198 const mat4 nonIdentityQuarter = mat4() * 0.25;
199
200 mOutput.setColorTransform(nonIdentityQuarter);
201
202 EXPECT_EQ(HAL_COLOR_TRANSFORM_ARBITRARY_MATRIX, mOutput.getState().colorTransform);
203 EXPECT_EQ(nonIdentityQuarter, mOutput.getState().colorTransformMat);
Lloyd Piqueef958122019-02-05 18:00:12 -0800204
205 // Since this is a state change, the entire output should now be dirty.
206 EXPECT_THAT(mOutput.getState().dirtyRegion, RegionEq(Region(kDefaultDisplaySize)));
Lloyd Pique32cbe282018-10-19 13:09:22 -0700207}
208
Lloyd Pique66d68602019-02-13 14:23:31 -0800209/*
Lloyd Pique32cbe282018-10-19 13:09:22 -0700210 * Output::setColorMode
211 */
212
Lloyd Piqueef958122019-02-05 18:00:12 -0800213TEST_F(OutputTest, setColorModeSetsStateAndDirtiesOutputIfChanged) {
Lloyd Piquef5275482019-01-29 18:42:42 -0800214 EXPECT_CALL(*mDisplayColorProfile,
215 getTargetDataspace(ui::ColorMode::DISPLAY_P3, ui::Dataspace::DISPLAY_P3,
216 ui::Dataspace::UNKNOWN))
217 .WillOnce(Return(ui::Dataspace::UNKNOWN));
Lloyd Piqueef958122019-02-05 18:00:12 -0800218 EXPECT_CALL(*mRenderSurface, setBufferDataspace(ui::Dataspace::DISPLAY_P3)).Times(1);
Lloyd Pique31cb2942018-10-19 17:23:03 -0700219
Lloyd Piqueef958122019-02-05 18:00:12 -0800220 mOutput.setColorMode(ui::ColorMode::DISPLAY_P3, ui::Dataspace::DISPLAY_P3,
Lloyd Piquef5275482019-01-29 18:42:42 -0800221 ui::RenderIntent::TONE_MAP_COLORIMETRIC, ui::Dataspace::UNKNOWN);
Lloyd Pique32cbe282018-10-19 13:09:22 -0700222
Lloyd Piqueef958122019-02-05 18:00:12 -0800223 EXPECT_EQ(ui::ColorMode::DISPLAY_P3, mOutput.getState().colorMode);
224 EXPECT_EQ(ui::Dataspace::DISPLAY_P3, mOutput.getState().dataspace);
Lloyd Pique32cbe282018-10-19 13:09:22 -0700225 EXPECT_EQ(ui::RenderIntent::TONE_MAP_COLORIMETRIC, mOutput.getState().renderIntent);
Lloyd Piquef5275482019-01-29 18:42:42 -0800226 EXPECT_EQ(ui::Dataspace::UNKNOWN, mOutput.getState().targetDataspace);
227
Lloyd Piqueef958122019-02-05 18:00:12 -0800228 EXPECT_THAT(mOutput.getState().dirtyRegion, RegionEq(Region(kDefaultDisplaySize)));
229}
230
231TEST_F(OutputTest, setColorModeDoesNothingIfNoChange) {
Lloyd Piquef5275482019-01-29 18:42:42 -0800232 EXPECT_CALL(*mDisplayColorProfile,
233 getTargetDataspace(ui::ColorMode::DISPLAY_P3, ui::Dataspace::DISPLAY_P3,
234 ui::Dataspace::UNKNOWN))
235 .WillOnce(Return(ui::Dataspace::UNKNOWN));
236
Lloyd Piqueef958122019-02-05 18:00:12 -0800237 mOutput.editState().colorMode = ui::ColorMode::DISPLAY_P3;
238 mOutput.editState().dataspace = ui::Dataspace::DISPLAY_P3;
239 mOutput.editState().renderIntent = ui::RenderIntent::TONE_MAP_COLORIMETRIC;
Lloyd Piquef5275482019-01-29 18:42:42 -0800240 mOutput.editState().targetDataspace = ui::Dataspace::UNKNOWN;
Lloyd Piqueef958122019-02-05 18:00:12 -0800241
242 mOutput.setColorMode(ui::ColorMode::DISPLAY_P3, ui::Dataspace::DISPLAY_P3,
Lloyd Piquef5275482019-01-29 18:42:42 -0800243 ui::RenderIntent::TONE_MAP_COLORIMETRIC, ui::Dataspace::UNKNOWN);
Lloyd Piqueef958122019-02-05 18:00:12 -0800244
245 EXPECT_THAT(mOutput.getState().dirtyRegion, RegionEq(Region()));
Lloyd Pique32cbe282018-10-19 13:09:22 -0700246}
247
Lloyd Pique66d68602019-02-13 14:23:31 -0800248/*
Lloyd Pique31cb2942018-10-19 17:23:03 -0700249 * Output::setRenderSurface()
250 */
251
252TEST_F(OutputTest, setRenderSurfaceResetsBounds) {
253 const ui::Size newDisplaySize{640, 480};
254
255 mock::RenderSurface* renderSurface = new StrictMock<mock::RenderSurface>();
256 EXPECT_CALL(*renderSurface, getSize()).WillOnce(ReturnRef(newDisplaySize));
257
258 mOutput.setRenderSurface(std::unique_ptr<RenderSurface>(renderSurface));
259
260 EXPECT_EQ(Rect(newDisplaySize), mOutput.getState().bounds);
261}
262
Lloyd Pique66d68602019-02-13 14:23:31 -0800263/*
Alec Mourie7d1d4a2019-02-05 01:13:46 +0000264 * Output::getDirtyRegion()
Lloyd Pique32cbe282018-10-19 13:09:22 -0700265 */
266
Alec Mourie7d1d4a2019-02-05 01:13:46 +0000267TEST_F(OutputTest, getDirtyRegionWithRepaintEverythingTrue) {
268 const Rect viewport{100, 200};
269 mOutput.editState().viewport = viewport;
Lloyd Pique32cbe282018-10-19 13:09:22 -0700270 mOutput.editState().dirtyRegion.set(50, 300);
271
272 {
Alec Mourie7d1d4a2019-02-05 01:13:46 +0000273 Region result = mOutput.getDirtyRegion(true);
Lloyd Pique32cbe282018-10-19 13:09:22 -0700274
Alec Mourie7d1d4a2019-02-05 01:13:46 +0000275 EXPECT_THAT(result, RegionEq(Region(viewport)));
Lloyd Pique32cbe282018-10-19 13:09:22 -0700276 }
277}
278
Alec Mourie7d1d4a2019-02-05 01:13:46 +0000279TEST_F(OutputTest, getDirtyRegionWithRepaintEverythingFalse) {
280 const Rect viewport{100, 200};
281 mOutput.editState().viewport = viewport;
Lloyd Pique32cbe282018-10-19 13:09:22 -0700282 mOutput.editState().dirtyRegion.set(50, 300);
283
284 {
Alec Mourie7d1d4a2019-02-05 01:13:46 +0000285 Region result = mOutput.getDirtyRegion(false);
Lloyd Pique32cbe282018-10-19 13:09:22 -0700286
287 // The dirtyRegion should be clipped to the display bounds.
288 EXPECT_THAT(result, RegionEq(Region(Rect(50, 200))));
289 }
Lloyd Pique32cbe282018-10-19 13:09:22 -0700290}
291
Lloyd Pique66d68602019-02-13 14:23:31 -0800292/*
Lloyd Piqueef36b002019-01-23 17:52:04 -0800293 * Output::belongsInOutput()
294 */
295
296TEST_F(OutputTest, belongsInOutputFiltersAsExpected) {
297 const uint32_t layerStack1 = 123u;
298 const uint32_t layerStack2 = 456u;
299
300 // If the output accepts layerStack1 and internal-only layers....
301 mOutput.setLayerStackFilter(layerStack1, true);
302
303 // Any layer with layerStack1 belongs to it, internal-only or not.
304 EXPECT_TRUE(mOutput.belongsInOutput(layerStack1, false));
305 EXPECT_TRUE(mOutput.belongsInOutput(layerStack1, true));
306 EXPECT_FALSE(mOutput.belongsInOutput(layerStack2, true));
307 EXPECT_FALSE(mOutput.belongsInOutput(layerStack2, false));
308
309 // If the output accepts layerStack21 but not internal-only layers...
310 mOutput.setLayerStackFilter(layerStack1, false);
311
312 // Only non-internal layers with layerStack1 belong to it.
313 EXPECT_TRUE(mOutput.belongsInOutput(layerStack1, false));
314 EXPECT_FALSE(mOutput.belongsInOutput(layerStack1, true));
315 EXPECT_FALSE(mOutput.belongsInOutput(layerStack2, true));
316 EXPECT_FALSE(mOutput.belongsInOutput(layerStack2, false));
317}
318
Lloyd Pique66d68602019-02-13 14:23:31 -0800319/*
Lloyd Piquecc01a452018-12-04 17:24:00 -0800320 * Output::getOutputLayerForLayer()
321 */
322
323TEST_F(OutputTest, getOutputLayerForLayerWorks) {
324 mock::OutputLayer* outputLayer1 = new StrictMock<mock::OutputLayer>();
325 mock::OutputLayer* outputLayer2 = new StrictMock<mock::OutputLayer>();
326
327 Output::OutputLayers outputLayers;
328 outputLayers.emplace_back(std::unique_ptr<OutputLayer>(outputLayer1));
329 outputLayers.emplace_back(nullptr);
330 outputLayers.emplace_back(std::unique_ptr<OutputLayer>(outputLayer2));
331 mOutput.setOutputLayersOrderedByZ(std::move(outputLayers));
332
333 StrictMock<mock::Layer> layer;
334 StrictMock<mock::Layer> otherLayer;
335
336 // If the input layer matches the first OutputLayer, it will be returned.
337 EXPECT_CALL(*outputLayer1, getLayer()).WillOnce(ReturnRef(layer));
338 EXPECT_EQ(outputLayer1, mOutput.getOutputLayerForLayer(&layer));
339
340 // If the input layer matches the second OutputLayer, it will be returned.
341 EXPECT_CALL(*outputLayer1, getLayer()).WillOnce(ReturnRef(otherLayer));
342 EXPECT_CALL(*outputLayer2, getLayer()).WillOnce(ReturnRef(layer));
343 EXPECT_EQ(outputLayer2, mOutput.getOutputLayerForLayer(&layer));
344
345 // If the input layer does not match an output layer, null will be returned.
346 EXPECT_CALL(*outputLayer1, getLayer()).WillOnce(ReturnRef(otherLayer));
347 EXPECT_CALL(*outputLayer2, getLayer()).WillOnce(ReturnRef(otherLayer));
348 EXPECT_EQ(nullptr, mOutput.getOutputLayerForLayer(&layer));
349}
350
Lloyd Pique66d68602019-02-13 14:23:31 -0800351/*
Lloyd Piquecc01a452018-12-04 17:24:00 -0800352 * Output::getOrCreateOutputLayer()
353 */
354
355TEST_F(OutputTest, getOrCreateOutputLayerWorks) {
356 mock::OutputLayer* existingOutputLayer = new StrictMock<mock::OutputLayer>();
357
358 Output::OutputLayers outputLayers;
359 outputLayers.emplace_back(nullptr);
360 outputLayers.emplace_back(std::unique_ptr<OutputLayer>(existingOutputLayer));
361 mOutput.setOutputLayersOrderedByZ(std::move(outputLayers));
362
363 std::shared_ptr<mock::Layer> layer{new StrictMock<mock::Layer>()};
364 sp<LayerFE> layerFE{new StrictMock<mock::LayerFE>()};
365
366 StrictMock<mock::Layer> otherLayer;
367
368 {
369 // If there is no OutputLayer corresponding to the input layer, a
370 // new OutputLayer is constructed and returned.
371 EXPECT_CALL(*existingOutputLayer, getLayer()).WillOnce(ReturnRef(otherLayer));
Lloyd Pique07e33212018-12-18 16:33:37 -0800372 auto result = mOutput.getOrCreateOutputLayer(std::nullopt, layer, layerFE);
Lloyd Piquecc01a452018-12-04 17:24:00 -0800373 EXPECT_NE(existingOutputLayer, result.get());
374 EXPECT_TRUE(result.get() != nullptr);
375 EXPECT_EQ(layer.get(), &result->getLayer());
376 EXPECT_EQ(layerFE.get(), &result->getLayerFE());
377
378 // The entries in the ordered array should be unchanged.
379 auto& outputLayers = mOutput.getOutputLayersOrderedByZ();
380 EXPECT_EQ(nullptr, outputLayers[0].get());
381 EXPECT_EQ(existingOutputLayer, outputLayers[1].get());
382 }
383
384 {
385 // If there is an existing OutputLayer for the requested layer, an owned
386 // pointer is returned
387 EXPECT_CALL(*existingOutputLayer, getLayer()).WillOnce(ReturnRef(*layer));
Lloyd Pique07e33212018-12-18 16:33:37 -0800388 auto result = mOutput.getOrCreateOutputLayer(std::nullopt, layer, layerFE);
Lloyd Piquecc01a452018-12-04 17:24:00 -0800389 EXPECT_EQ(existingOutputLayer, result.get());
390
391 // The corresponding entry in the ordered array should be cleared.
392 auto& outputLayers = mOutput.getOutputLayersOrderedByZ();
393 EXPECT_EQ(nullptr, outputLayers[0].get());
394 EXPECT_EQ(nullptr, outputLayers[1].get());
395 }
396}
397
Lloyd Pique66d68602019-02-13 14:23:31 -0800398/*
399 * Output::prepareFrame()
400 */
401
402struct OutputPrepareFrameTest : public testing::Test {
403 struct OutputPartialMock : public impl::Output {
404 OutputPartialMock(const compositionengine::CompositionEngine& compositionEngine)
405 : impl::Output(compositionEngine) {}
406
407 // Sets up the helper functions called by prepareFrame to use a mock
408 // implementations.
409 MOCK_METHOD0(chooseCompositionStrategy, void());
410 };
411
412 OutputPrepareFrameTest() {
413 mOutput.setDisplayColorProfileForTest(
414 std::unique_ptr<DisplayColorProfile>(mDisplayColorProfile));
415 mOutput.setRenderSurfaceForTest(std::unique_ptr<RenderSurface>(mRenderSurface));
416 }
417
418 StrictMock<mock::CompositionEngine> mCompositionEngine;
419 mock::DisplayColorProfile* mDisplayColorProfile = new StrictMock<mock::DisplayColorProfile>();
420 mock::RenderSurface* mRenderSurface = new StrictMock<mock::RenderSurface>();
421 StrictMock<OutputPartialMock> mOutput{mCompositionEngine};
422};
423
424TEST_F(OutputPrepareFrameTest, takesEarlyOutIfNotEnabled) {
425 mOutput.editState().isEnabled = false;
426
427 mOutput.prepareFrame();
428}
429
430TEST_F(OutputPrepareFrameTest, delegatesToChooseCompositionStrategyAndRenderSurface) {
431 mOutput.editState().isEnabled = true;
432 mOutput.editState().usesClientComposition = false;
433 mOutput.editState().usesDeviceComposition = true;
434
435 EXPECT_CALL(mOutput, chooseCompositionStrategy()).Times(1);
436 EXPECT_CALL(*mRenderSurface, prepareFrame(false, true));
437
438 mOutput.prepareFrame();
439}
440
441// Note: Use OutputTest and not OutputPrepareFrameTest, so the real
442// base chooseCompositionStrategy() is invoked.
443TEST_F(OutputTest, prepareFrameSetsClientCompositionOnlyByDefault) {
444 mOutput.editState().isEnabled = true;
445 mOutput.editState().usesClientComposition = false;
446 mOutput.editState().usesDeviceComposition = true;
447
448 EXPECT_CALL(*mRenderSurface, prepareFrame(true, false));
449
450 mOutput.prepareFrame();
451
452 EXPECT_TRUE(mOutput.getState().usesClientComposition);
453 EXPECT_FALSE(mOutput.getState().usesDeviceComposition);
454}
455
Lloyd Pique56eba802019-08-28 15:45:25 -0700456/*
457 * Output::composeSurfaces()
458 */
459
460struct OutputComposeSurfacesTest : public testing::Test {
461 static constexpr uint32_t kDefaultOutputOrientation = TR_IDENT;
462 static constexpr ui::Dataspace kDefaultOutputDataspace = ui::Dataspace::DISPLAY_P3;
463
464 static const Rect kDefaultOutputFrame;
465 static const Rect kDefaultOutputViewport;
466 static const Rect kDefaultOutputScissor;
467 static const mat4 kDefaultColorTransformMat;
468
469 struct OutputPartialMock : public impl::Output {
470 OutputPartialMock(const compositionengine::CompositionEngine& compositionEngine)
471 : impl::Output(compositionEngine) {}
472
473 // Sets up the helper functions called by composeSurfaces to use a mock
474 // implementations.
475 MOCK_CONST_METHOD0(getSkipColorTransform, bool());
476 MOCK_METHOD2(generateClientCompositionRequests,
477 std::vector<renderengine::LayerSettings>(bool, Region&));
478 MOCK_METHOD2(appendRegionFlashRequests,
479 void(const Region&, std::vector<renderengine::LayerSettings>&));
480 MOCK_METHOD1(setExpensiveRenderingExpected, void(bool));
481 };
482
483 OutputComposeSurfacesTest() {
484 mOutput.setDisplayColorProfileForTest(
485 std::unique_ptr<DisplayColorProfile>(mDisplayColorProfile));
486 mOutput.setRenderSurfaceForTest(std::unique_ptr<RenderSurface>(mRenderSurface));
487
488 Output::OutputLayers outputLayers;
489 outputLayers.emplace_back(std::unique_ptr<OutputLayer>(mOutputLayer1));
490 outputLayers.emplace_back(std::unique_ptr<OutputLayer>(mOutputLayer2));
491 mOutput.setOutputLayersOrderedByZ(std::move(outputLayers));
492
493 mOutput.editState().frame = kDefaultOutputFrame;
494 mOutput.editState().viewport = kDefaultOutputViewport;
495 mOutput.editState().scissor = kDefaultOutputScissor;
496 mOutput.editState().transform = ui::Transform{kDefaultOutputOrientation};
497 mOutput.editState().orientation = kDefaultOutputOrientation;
498 mOutput.editState().dataspace = kDefaultOutputDataspace;
499 mOutput.editState().colorTransformMat = kDefaultColorTransformMat;
500 mOutput.editState().isSecure = true;
501 mOutput.editState().needsFiltering = false;
502 mOutput.editState().usesClientComposition = true;
503 mOutput.editState().usesDeviceComposition = false;
504
505 EXPECT_CALL(mCompositionEngine, getRenderEngine()).WillRepeatedly(ReturnRef(mRenderEngine));
506 }
507
508 StrictMock<mock::CompositionEngine> mCompositionEngine;
509 StrictMock<renderengine::mock::RenderEngine> mRenderEngine;
510 mock::DisplayColorProfile* mDisplayColorProfile = new StrictMock<mock::DisplayColorProfile>();
511 mock::RenderSurface* mRenderSurface = new StrictMock<mock::RenderSurface>();
512 mock::OutputLayer* mOutputLayer1 = new StrictMock<mock::OutputLayer>();
513 mock::OutputLayer* mOutputLayer2 = new StrictMock<mock::OutputLayer>();
514 StrictMock<OutputPartialMock> mOutput{mCompositionEngine};
515 sp<GraphicBuffer> mOutputBuffer = new GraphicBuffer();
516};
517
518const Rect OutputComposeSurfacesTest::kDefaultOutputFrame{1001, 1002, 1003, 1004};
519const Rect OutputComposeSurfacesTest::kDefaultOutputViewport{1005, 1006, 1007, 1008};
520const Rect OutputComposeSurfacesTest::kDefaultOutputScissor{1009, 1010, 1011, 1012};
521const mat4 OutputComposeSurfacesTest::kDefaultColorTransformMat{mat4() * 0.5};
522
523// TODO(b/121291683): Expand unit test coverage for composeSurfaces beyond these
524// basic tests.
525
526TEST_F(OutputComposeSurfacesTest, doesNothingIfNoClientComposition) {
527 mOutput.editState().usesClientComposition = false;
528
529 Region debugRegion;
Lloyd Piqued3d69882019-02-28 16:03:46 -0800530 std::optional<base::unique_fd> readyFence = mOutput.composeSurfaces(debugRegion);
531 EXPECT_TRUE(readyFence);
Lloyd Pique56eba802019-08-28 15:45:25 -0700532}
533
534TEST_F(OutputComposeSurfacesTest, worksIfNoClientLayersQueued) {
535 const Region kDebugRegion{Rect{100, 101, 102, 103}};
536
537 constexpr float kDefaultMaxLuminance = 1.0f;
538 constexpr float kDefaultAvgLuminance = 0.7f;
539 constexpr float kDefaultMinLuminance = 0.1f;
540 HdrCapabilities HdrCapabilities{{},
541 kDefaultMaxLuminance,
542 kDefaultAvgLuminance,
543 kDefaultMinLuminance};
544
545 EXPECT_CALL(mRenderEngine, supportsProtectedContent()).WillOnce(Return(false));
546 EXPECT_CALL(mRenderEngine, drawLayers(_, _, _, true, _, _)).Times(1);
547
548 EXPECT_CALL(*mDisplayColorProfile, hasWideColorGamut()).WillOnce(Return(true));
549 EXPECT_CALL(*mDisplayColorProfile, getHdrCapabilities()).WillOnce(ReturnRef(HdrCapabilities));
550
551 EXPECT_CALL(*mRenderSurface, dequeueBuffer(_)).WillOnce(Return(mOutputBuffer));
552
553 EXPECT_CALL(mOutput, getSkipColorTransform()).WillOnce(Return(false));
554 EXPECT_CALL(mOutput, generateClientCompositionRequests(false, _)).Times(1);
555 EXPECT_CALL(mOutput, appendRegionFlashRequests(RegionEq(kDebugRegion), _)).Times(1);
556 EXPECT_CALL(mOutput, setExpensiveRenderingExpected(true)).Times(1);
557 EXPECT_CALL(mOutput, setExpensiveRenderingExpected(false)).Times(1);
558
Lloyd Piqued3d69882019-02-28 16:03:46 -0800559 std::optional<base::unique_fd> readyFence = mOutput.composeSurfaces(kDebugRegion);
560 EXPECT_TRUE(readyFence);
Lloyd Pique56eba802019-08-28 15:45:25 -0700561}
562
563/*
564 * Output::generateClientCompositionRequests()
565 */
566
567struct GenerateClientCompositionRequestsTest : public testing::Test {
568 struct OutputPartialMock : public impl::Output {
569 OutputPartialMock(const compositionengine::CompositionEngine& compositionEngine)
570 : impl::Output(compositionEngine) {}
571
572 std::vector<renderengine::LayerSettings> generateClientCompositionRequests(
573 bool supportsProtectedContent, Region& clearRegion) override {
574 return impl::Output::generateClientCompositionRequests(supportsProtectedContent,
575 clearRegion);
576 }
577 };
578
579 GenerateClientCompositionRequestsTest() {
580 mOutput.setDisplayColorProfileForTest(
581 std::unique_ptr<DisplayColorProfile>(mDisplayColorProfile));
582 mOutput.setRenderSurfaceForTest(std::unique_ptr<RenderSurface>(mRenderSurface));
583 }
584
585 StrictMock<mock::CompositionEngine> mCompositionEngine;
586 mock::DisplayColorProfile* mDisplayColorProfile = new StrictMock<mock::DisplayColorProfile>();
587 mock::RenderSurface* mRenderSurface = new StrictMock<mock::RenderSurface>();
588 StrictMock<OutputPartialMock> mOutput{mCompositionEngine};
589};
590
591// TODO(b/121291683): Add more unit test coverage for generateClientCompositionRequests
592
593TEST_F(GenerateClientCompositionRequestsTest, worksForLandscapeModeSplitScreen) {
594 // In split-screen landscape mode, the screen is rotated 90 degrees, with
595 // one layer on the left covering the left side of the output, and one layer
596 // on the right covering that side of the output.
597
598 mock::OutputLayer* leftOutputLayer = new StrictMock<mock::OutputLayer>();
599 mock::OutputLayer* rightOutputLayer = new StrictMock<mock::OutputLayer>();
600
601 StrictMock<mock::Layer> leftLayer;
602 StrictMock<mock::LayerFE> leftLayerFE;
603 StrictMock<mock::Layer> rightLayer;
604 StrictMock<mock::LayerFE> rightLayerFE;
605
606 impl::OutputLayerCompositionState leftOutputLayerState;
607 leftOutputLayerState.clearClientTarget = false;
608
609 impl::LayerCompositionState leftLayerState;
610 leftLayerState.frontEnd.geomVisibleRegion = Region{Rect{0, 0, 1000, 1000}};
611 leftLayerState.frontEnd.isOpaque = true;
612
613 const half3 leftLayerColor{1.f, 0.f, 0.f};
614 renderengine::LayerSettings leftLayerRESettings;
615 leftLayerRESettings.source.solidColor = leftLayerColor;
616
617 impl::OutputLayerCompositionState rightOutputLayerState;
618 rightOutputLayerState.clearClientTarget = false;
619
620 impl::LayerCompositionState rightLayerState;
621 rightLayerState.frontEnd.geomVisibleRegion = Region{Rect{1000, 0, 2000, 1000}};
622 rightLayerState.frontEnd.isOpaque = true;
623
624 const half3 rightLayerColor{0.f, 1.f, 0.f};
625 renderengine::LayerSettings rightLayerRESettings;
626 rightLayerRESettings.source.solidColor = rightLayerColor;
627
628 EXPECT_CALL(*leftOutputLayer, getState()).WillRepeatedly(ReturnRef(leftOutputLayerState));
629 EXPECT_CALL(*leftOutputLayer, getLayer()).WillRepeatedly(ReturnRef(leftLayer));
630 EXPECT_CALL(*leftOutputLayer, getLayerFE()).WillRepeatedly(ReturnRef(leftLayerFE));
631 EXPECT_CALL(*leftOutputLayer, requiresClientComposition()).WillRepeatedly(Return(true));
632 EXPECT_CALL(*leftOutputLayer, needsFiltering()).WillRepeatedly(Return(false));
633 EXPECT_CALL(leftLayer, getState()).WillRepeatedly(ReturnRef(leftLayerState));
634 EXPECT_CALL(leftLayerFE, prepareClientComposition(_)).WillOnce(Return(leftLayerRESettings));
635
636 EXPECT_CALL(*rightOutputLayer, getState()).WillRepeatedly(ReturnRef(rightOutputLayerState));
637 EXPECT_CALL(*rightOutputLayer, getLayer()).WillRepeatedly(ReturnRef(rightLayer));
638 EXPECT_CALL(*rightOutputLayer, getLayerFE()).WillRepeatedly(ReturnRef(rightLayerFE));
639 EXPECT_CALL(*rightOutputLayer, requiresClientComposition()).WillRepeatedly(Return(true));
640 EXPECT_CALL(*rightOutputLayer, needsFiltering()).WillRepeatedly(Return(false));
641 EXPECT_CALL(rightLayer, getState()).WillRepeatedly(ReturnRef(rightLayerState));
642 EXPECT_CALL(rightLayerFE, prepareClientComposition(_)).WillOnce(Return(rightLayerRESettings));
643
644 Output::OutputLayers outputLayers;
645 outputLayers.emplace_back(std::unique_ptr<OutputLayer>(leftOutputLayer));
646 outputLayers.emplace_back(std::unique_ptr<OutputLayer>(rightOutputLayer));
647 mOutput.setOutputLayersOrderedByZ(std::move(outputLayers));
648
649 const Rect kPortraitFrame(0, 0, 1000, 2000);
650 const Rect kPortraitViewport(0, 0, 2000, 1000);
651 const Rect kPortraitScissor(0, 0, 1000, 2000);
652 const uint32_t kPortraitOrientation = TR_ROT_90;
653
654 mOutput.editState().frame = kPortraitFrame;
655 mOutput.editState().viewport = kPortraitViewport;
656 mOutput.editState().scissor = kPortraitScissor;
657 mOutput.editState().transform = ui::Transform{kPortraitOrientation};
658 mOutput.editState().orientation = kPortraitOrientation;
659 mOutput.editState().needsFiltering = true;
660 mOutput.editState().isSecure = false;
661
662 constexpr bool supportsProtectedContent = false;
663 Region clearRegion;
664 auto requests =
665 mOutput.generateClientCompositionRequests(supportsProtectedContent, clearRegion);
666
667 ASSERT_EQ(2u, requests.size());
668 EXPECT_EQ(leftLayerColor, requests[0].source.solidColor);
669 EXPECT_EQ(rightLayerColor, requests[1].source.solidColor);
670}
671
672TEST_F(GenerateClientCompositionRequestsTest, ignoresLayersThatDoNotIntersectWithViewport) {
673 // Layers whose visible region does not intersect with the viewport will be
674 // skipped when generating client composition request state.
675
676 mock::OutputLayer* outputLayer = new StrictMock<mock::OutputLayer>();
677 StrictMock<mock::Layer> layer;
678 StrictMock<mock::LayerFE> layerFE;
679
680 impl::OutputLayerCompositionState outputLayerState;
681 outputLayerState.clearClientTarget = false;
682
683 impl::LayerCompositionState layerState;
684 layerState.frontEnd.geomVisibleRegion = Region{Rect{3000, 0, 4000, 1000}};
685 layerState.frontEnd.isOpaque = true;
686
687 EXPECT_CALL(*outputLayer, getState()).WillRepeatedly(ReturnRef(outputLayerState));
688 EXPECT_CALL(*outputLayer, getLayer()).WillRepeatedly(ReturnRef(layer));
689 EXPECT_CALL(*outputLayer, getLayerFE()).WillRepeatedly(ReturnRef(layerFE));
690 EXPECT_CALL(*outputLayer, requiresClientComposition()).WillRepeatedly(Return(true));
691 EXPECT_CALL(*outputLayer, needsFiltering()).WillRepeatedly(Return(false));
692 EXPECT_CALL(layer, getState()).WillRepeatedly(ReturnRef(layerState));
693 EXPECT_CALL(layerFE, prepareClientComposition(_)).Times(0);
694
695 Output::OutputLayers outputLayers;
696 outputLayers.emplace_back(std::unique_ptr<OutputLayer>(outputLayer));
697 mOutput.setOutputLayersOrderedByZ(std::move(outputLayers));
698
699 const Rect kPortraitFrame(0, 0, 1000, 2000);
700 const Rect kPortraitViewport(0, 0, 2000, 1000);
701 const Rect kPortraitScissor(0, 0, 1000, 2000);
702 const uint32_t kPortraitOrientation = TR_ROT_90;
703
704 mOutput.editState().frame = kPortraitFrame;
705 mOutput.editState().viewport = kPortraitViewport;
706 mOutput.editState().scissor = kPortraitScissor;
707 mOutput.editState().transform = ui::Transform{kPortraitOrientation};
708 mOutput.editState().orientation = kPortraitOrientation;
709 mOutput.editState().needsFiltering = true;
710 mOutput.editState().isSecure = false;
711
712 constexpr bool supportsProtectedContent = false;
713 Region clearRegion;
714 auto requests =
715 mOutput.generateClientCompositionRequests(supportsProtectedContent, clearRegion);
716
717 EXPECT_EQ(0u, requests.size());
718}
719
Lloyd Piquec2d54d42019-08-28 18:04:21 -0700720TEST_F(GenerateClientCompositionRequestsTest, clearsDeviceLayesAfterFirst) {
721 // If client composition is performed with some layers set to use device
722 // composition, device layers after the first layer (device or client) will
723 // clear the frame buffer if they are opaque and if that layer has a flag
724 // set to do so. The first layer is skipped as the frame buffer is already
725 // expected to be clear.
726
727 mock::OutputLayer* leftOutputLayer = new StrictMock<mock::OutputLayer>();
728 mock::OutputLayer* rightOutputLayer = new StrictMock<mock::OutputLayer>();
729
730 StrictMock<mock::Layer> leftLayer;
731 StrictMock<mock::LayerFE> leftLayerFE;
732 StrictMock<mock::Layer> rightLayer;
733 StrictMock<mock::LayerFE> rightLayerFE;
734
735 impl::OutputLayerCompositionState leftOutputLayerState;
736 leftOutputLayerState.clearClientTarget = true;
737
738 impl::LayerCompositionState leftLayerState;
739 leftLayerState.frontEnd.geomVisibleRegion = Region{Rect{0, 0, 1000, 1000}};
740 leftLayerState.frontEnd.isOpaque = true;
741
742 impl::OutputLayerCompositionState rightOutputLayerState;
743 rightOutputLayerState.clearClientTarget = true;
744
745 impl::LayerCompositionState rightLayerState;
746 rightLayerState.frontEnd.geomVisibleRegion = Region{Rect{1000, 0, 2000, 1000}};
747 rightLayerState.frontEnd.isOpaque = true;
748
749 const half3 rightLayerColor{0.f, 1.f, 0.f};
750 renderengine::LayerSettings rightLayerRESettings;
751 rightLayerRESettings.geometry.boundaries = FloatRect{456, 0, 0, 0};
752 rightLayerRESettings.source.solidColor = rightLayerColor;
753
754 EXPECT_CALL(*leftOutputLayer, getState()).WillRepeatedly(ReturnRef(leftOutputLayerState));
755 EXPECT_CALL(*leftOutputLayer, getLayer()).WillRepeatedly(ReturnRef(leftLayer));
756 EXPECT_CALL(*leftOutputLayer, getLayerFE()).WillRepeatedly(ReturnRef(leftLayerFE));
757 EXPECT_CALL(*leftOutputLayer, requiresClientComposition()).WillRepeatedly(Return(false));
758 EXPECT_CALL(*leftOutputLayer, needsFiltering()).WillRepeatedly(Return(false));
759 EXPECT_CALL(leftLayer, getState()).WillRepeatedly(ReturnRef(leftLayerState));
760
761 EXPECT_CALL(*rightOutputLayer, getState()).WillRepeatedly(ReturnRef(rightOutputLayerState));
762 EXPECT_CALL(*rightOutputLayer, getLayer()).WillRepeatedly(ReturnRef(rightLayer));
763 EXPECT_CALL(*rightOutputLayer, getLayerFE()).WillRepeatedly(ReturnRef(rightLayerFE));
764 EXPECT_CALL(*rightOutputLayer, requiresClientComposition()).WillRepeatedly(Return(false));
765 EXPECT_CALL(*rightOutputLayer, needsFiltering()).WillRepeatedly(Return(false));
766 EXPECT_CALL(rightLayer, getState()).WillRepeatedly(ReturnRef(rightLayerState));
767 EXPECT_CALL(rightLayerFE, prepareClientComposition(_)).WillOnce(Return(rightLayerRESettings));
768
769 Output::OutputLayers outputLayers;
770 outputLayers.emplace_back(std::unique_ptr<OutputLayer>(leftOutputLayer));
771 outputLayers.emplace_back(std::unique_ptr<OutputLayer>(rightOutputLayer));
772 mOutput.setOutputLayersOrderedByZ(std::move(outputLayers));
773
774 const Rect kPortraitFrame(0, 0, 1000, 2000);
775 const Rect kPortraitViewport(0, 0, 2000, 1000);
776 const Rect kPortraitScissor(0, 0, 1000, 2000);
777 const uint32_t kPortraitOrientation = TR_ROT_90;
778
779 mOutput.editState().frame = kPortraitFrame;
780 mOutput.editState().viewport = kPortraitViewport;
781 mOutput.editState().scissor = kPortraitScissor;
782 mOutput.editState().transform = ui::Transform{kPortraitOrientation};
783 mOutput.editState().orientation = kPortraitOrientation;
784 mOutput.editState().needsFiltering = true;
785 mOutput.editState().isSecure = false;
786
787 constexpr bool supportsProtectedContent = false;
788 Region clearRegion;
789 auto requests =
790 mOutput.generateClientCompositionRequests(supportsProtectedContent, clearRegion);
791
792 const half3 clearColor{0.f, 0.f, 0.f};
793
794 ASSERT_EQ(1u, requests.size());
795 EXPECT_EQ(456.f, requests[0].geometry.boundaries.left);
796 EXPECT_EQ(clearColor, requests[0].source.solidColor);
797}
798
Lloyd Pique32cbe282018-10-19 13:09:22 -0700799} // namespace
800} // namespace android::compositionengine