OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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 "content/public/browser/android/layer_tree_build_helper.h" |
| 6 |
| 7 #include "cc/layers/layer.h" |
| 8 #include "cc/layers/solid_color_layer.h" |
| 9 |
| 10 |
| 11 namespace content { |
| 12 |
| 13 LayerTreeBuildHelper::LayerTreeBuildHelper() |
| 14 : root_layer_(cc::SolidColorLayer::Create()) { |
| 15 root_layer_->SetIsDrawable(true); |
| 16 root_layer_->SetBackgroundColor(SK_ColorWHITE); |
| 17 } |
| 18 |
| 19 LayerTreeBuildHelper::~LayerTreeBuildHelper() { |
| 20 } |
| 21 |
| 22 scoped_refptr<cc::Layer> LayerTreeBuildHelper::GetLayerTree( |
| 23 cc::Layer* content_root_layer) { |
| 24 if (content_root_layer) |
| 25 root_layer_ = content_root_layer; |
| 26 else |
| 27 root_layer_ = cc::Layer(); |
| 28 |
| 29 return root_layer_; |
| 30 } |
| 31 } // namespace content |
OLD | NEW |