blob: 803e807d7bbeaa853db0e99eb789a595f978f924 [file] [log] [blame]
Garfield Tan23202892022-03-02 16:10:21 -08001/*
Dominik Laskowskifb281c52023-02-11 14:24:19 -05002 * Copyright 2022 The Android Open Source Project
Garfield Tan23202892022-03-02 16:10:21 -08003 *
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 "LayerTestUtils.h"
18
Garfield Tan23202892022-03-02 16:10:21 -080019namespace android {
20
Garfield Tan23202892022-03-02 16:10:21 -080021sp<Layer> BufferStateLayerFactory::createLayer(TestableSurfaceFlinger& flinger) {
22 sp<Client> client;
23 LayerCreationArgs args(flinger.flinger(), client, "buffer-state-layer", LAYER_FLAGS,
24 LayerMetadata());
Patrick Williams83f36b22022-09-14 17:57:35 +000025 return sp<Layer>::make(args);
Garfield Tan23202892022-03-02 16:10:21 -080026}
27
28sp<Layer> EffectLayerFactory::createLayer(TestableSurfaceFlinger& flinger) {
29 sp<Client> client;
30 LayerCreationArgs args(flinger.flinger(), client, "color-layer", LAYER_FLAGS, LayerMetadata());
Patrick Williams46b61b92022-09-01 17:25:49 +000031 return sp<Layer>::make(args);
Garfield Tan23202892022-03-02 16:10:21 -080032}
33
34std::string PrintToStringParamName(
35 const ::testing::TestParamInfo<std::shared_ptr<LayerFactory>>& info) {
36 return info.param->name();
37}
38
39BaseLayerTest::BaseLayerTest() {
Dominik Laskowskifb281c52023-02-11 14:24:19 -050040 mFlinger.setupMockScheduler();
Garfield Tan23202892022-03-02 16:10:21 -080041}
42
43} // namespace android