Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: content/browser/android/layer_tree_build_helper.cc

Issue 201583004: Add layerTreeBuildHelper to control layer tree in ContentViewRenderView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved setting up layer tree to a helper class Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/android/layer_tree_build_helper.cc
diff --git a/content/browser/android/layer_tree_build_helper.cc b/content/browser/android/layer_tree_build_helper.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d5a1bcefbce28eea1821e55852ec51e8d2074e6d
--- /dev/null
+++ b/content/browser/android/layer_tree_build_helper.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.h"
+
+#include "cc/layers/layer.h"
+#include "cc/layers/solid_color_layer.h"
+#include "content/browser/android/content_view_core_impl.h"
+
+
+namespace content {
+
+
+LayerTreeBuildHelper::LayerTreeBuildHelper()
+ : root_layer_(cc::SolidColorLayer::Create()) {
+ root_layer_->SetIsDrawable(true);
+ root_layer_->SetBackgroundColor(SK_ColorWHITE);
+}
+
+LayerTreeBuildHelper::~LayerTreeBuildHelper() {
+}
+
+cc::Layer* LayerTreeBuildHelper::GetLayerTree(
+ ContentViewCoreImpl* content_view) {
Yaron 2014/04/10 01:26:09 Does this need ContentViewCoreImpl? Seems like ups
Yusuf 2014/04/23 00:16:14 Done.
+ if (content_view)
+ root_layer_ = content_view->GetLayer();
Yaron 2014/04/10 01:26:09 I don't know if this is a real issue but if you ar
Yusuf 2014/04/23 00:16:14 Done.
+ return root_layer_.get();
+}
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698