| David Sodman | b8af792 | 2017-12-21 15:17:55 -0800 | [diff] [blame] | 1 | /* | 
|  | 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 Sodman | 7e4ae11 | 2018-02-09 15:02:28 -0800 | [diff] [blame] | 23 |  | 
| David Sodman | b8af792 | 2017-12-21 15:17:55 -0800 | [diff] [blame] | 24 | namespace android { | 
|  | 25 |  | 
| Lloyd Pique | 0b785d8 | 2018-12-04 17:25:27 -0800 | [diff] [blame] | 26 | LayerBE::LayerBE(Layer* layer, std::string layerName) : mLayer(layer) { | 
| David Sodman | 40a3a5a | 2018-05-16 11:55:52 -0700 | [diff] [blame] | 27 | compositionInfo.layer = std::make_shared<LayerBE>(*this); | 
| David Sodman | 2b727ac | 2017-12-21 14:28:08 -0800 | [diff] [blame] | 28 | compositionInfo.layerName = layerName; | 
| David Sodman | b8af792 | 2017-12-21 15:17:55 -0800 | [diff] [blame] | 29 | } | 
|  | 30 |  | 
| Lloyd Pique | 0b785d8 | 2018-12-04 17:25:27 -0800 | [diff] [blame] | 31 | LayerBE::LayerBE(const LayerBE& layer) : mLayer(layer.mLayer) { | 
| David Sodman | 40a3a5a | 2018-05-16 11:55:52 -0700 | [diff] [blame] | 32 | compositionInfo.layer = layer.compositionInfo.layer; | 
|  | 33 | compositionInfo.layerName = layer.mLayer->getName().string(); | 
|  | 34 | } | 
|  | 35 |  | 
| David Sodman | b8af792 | 2017-12-21 15:17:55 -0800 | [diff] [blame] | 36 | void LayerBE::onLayerDisplayed(const sp<Fence>& releaseFence) { | 
| David Sodman | 1509411 | 2018-10-11 09:39:37 -0700 | [diff] [blame] | 37 | mLayer->onLayerDisplayed(releaseFence); | 
| David Sodman | b8af792 | 2017-12-21 15:17:55 -0800 | [diff] [blame] | 38 | } | 
|  | 39 |  | 
| David Sodman | b8af792 | 2017-12-21 15:17:55 -0800 | [diff] [blame] | 40 | }; // namespace android |