Vladimir Levin | 0060909 | 2022-01-18 16:58:06 | [diff] [blame] | 1 | // Copyright 2021 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "cc/layers/document_transition_content_layer.h" |
| 6 | |
| 7 | #include <memory> |
| 8 | |
| 9 | #include "base/logging.h" |
| 10 | #include "cc/layers/document_transition_content_layer_impl.h" |
| 11 | #include "cc/trees/layer_tree_host.h" |
| 12 | |
| 13 | namespace cc { |
| 14 | |
| 15 | scoped_refptr<DocumentTransitionContentLayer> |
| 16 | DocumentTransitionContentLayer::Create( |
| 17 | const viz::SharedElementResourceId& resource_id) { |
| 18 | return base::WrapRefCounted(new DocumentTransitionContentLayer(resource_id)); |
| 19 | } |
| 20 | |
| 21 | DocumentTransitionContentLayer::DocumentTransitionContentLayer( |
| 22 | const viz::SharedElementResourceId& resource_id) |
| 23 | : resource_id_(resource_id) {} |
| 24 | |
| 25 | DocumentTransitionContentLayer::~DocumentTransitionContentLayer() = default; |
| 26 | |
| 27 | std::unique_ptr<LayerImpl> DocumentTransitionContentLayer::CreateLayerImpl( |
| 28 | LayerTreeImpl* tree_impl) { |
| 29 | return DocumentTransitionContentLayerImpl::Create(tree_impl, id(), |
| 30 | resource_id_); |
| 31 | } |
| 32 | |
| 33 | } // namespace cc |