blob: 9f634408c7d112f4e78994af86d1a798d402ddb5 [file] [log] [blame]
David Sodmanb8af7922017-12-21 15:17:55 -08001/*
2 * Copyright (C) 2017 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#define LOG_NDEBUG 0
18#undef LOG_TAG
19#define LOG_TAG "LayerBE"
20#define ATRACE_TAG ATRACE_TAG_GRAPHICS
21
22#include "Layer.h"
David Sodman7e4ae112018-02-09 15:02:28 -080023
David Sodmanb8af7922017-12-21 15:17:55 -080024namespace android {
25
Lloyd Pique0b785d82018-12-04 17:25:27 -080026LayerBE::LayerBE(Layer* layer, std::string layerName) : mLayer(layer) {
David Sodman40a3a5a2018-05-16 11:55:52 -070027 compositionInfo.layer = std::make_shared<LayerBE>(*this);
David Sodman2b727ac2017-12-21 14:28:08 -080028 compositionInfo.layerName = layerName;
David Sodmanb8af7922017-12-21 15:17:55 -080029}
30
Lloyd Pique0b785d82018-12-04 17:25:27 -080031LayerBE::LayerBE(const LayerBE& layer) : mLayer(layer.mLayer) {
David Sodman40a3a5a2018-05-16 11:55:52 -070032 compositionInfo.layer = layer.compositionInfo.layer;
33 compositionInfo.layerName = layer.mLayer->getName().string();
34}
35
David Sodmanb8af7922017-12-21 15:17:55 -080036void LayerBE::onLayerDisplayed(const sp<Fence>& releaseFence) {
David Sodman15094112018-10-11 09:39:37 -070037 mLayer->onLayerDisplayed(releaseFence);
David Sodmanb8af7922017-12-21 15:17:55 -080038}
39
David Sodmanb8af7922017-12-21 15:17:55 -080040}; // namespace android