Chromium Code Reviews| Index: content/browser/android/layer_tree_build_helper_impl.cc |
| diff --git a/content/browser/android/layer_tree_build_helper_impl.cc b/content/browser/android/layer_tree_build_helper_impl.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6849eff2a28c8a54a1385691c75d79807b9873bd |
| --- /dev/null |
| +++ b/content/browser/android/layer_tree_build_helper_impl.cc |
| @@ -0,0 +1,30 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "content/browser/android/layer_tree_build_helper_impl.h" |
| + |
| +#include "cc/layers/layer.h" |
| +#include "cc/layers/solid_color_layer.h" |
| + |
| +namespace content { |
| + |
| +LayerTreeBuildHelperImpl::LayerTreeBuildHelperImpl() { |
| + root_layer_ = cc::SolidColorLayer::Create(); |
| + root_layer_->SetIsDrawable(true); |
| + root_layer_->SetBackgroundColor(SK_ColorWHITE); |
|
no sievers
2014/05/05 20:04:00
This layer does not do anything since the bounds a
|
| +} |
| + |
| +LayerTreeBuildHelperImpl::~LayerTreeBuildHelperImpl() { |
| +} |
| + |
| +scoped_refptr<cc::Layer> LayerTreeBuildHelperImpl::GetLayerTree( |
| + scoped_refptr<cc::Layer> content_root_layer) { |
| + if (content_root_layer) |
| + root_layer_ = content_root_layer; |
| + else |
| + root_layer_ = cc::Layer::Create(); |
| + |
| + return root_layer_; |
| +} |
| +} // namespace content |