Index: content/public/browser/android/layer_tree_build_helper.cc |
diff --git a/content/public/browser/android/layer_tree_build_helper.cc b/content/public/browser/android/layer_tree_build_helper.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d1f147209372759716d70a52d6ac3c70d7087e45 |
--- /dev/null |
+++ b/content/public/browser/android/layer_tree_build_helper.cc |
@@ -0,0 +1,31 @@ |
+// 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/public/browser/android/layer_tree_build_helper.h" |
+ |
+#include "cc/layers/layer.h" |
+#include "cc/layers/solid_color_layer.h" |
+ |
+ |
+namespace content { |
+ |
+LayerTreeBuildHelper::LayerTreeBuildHelper() |
+ : root_layer_(cc::SolidColorLayer::Create()) { |
+ root_layer_->SetIsDrawable(true); |
+ root_layer_->SetBackgroundColor(SK_ColorWHITE); |
+} |
+ |
+LayerTreeBuildHelper::~LayerTreeBuildHelper() { |
+} |
+ |
+scoped_refptr<cc::Layer> LayerTreeBuildHelper::GetLayerTree( |
+ cc::Layer* content_root_layer) { |
+ if (content_root_layer) |
+ root_layer_ = content_root_layer; |
+ else |
+ root_layer_ = cc::Layer(); |
+ |
+ return root_layer_; |
+} |
+} // namespace content |