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

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

Issue 201583004: Add layerTreeBuildHelper to control layer tree in ContentViewRenderView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Final comments Created 6 years, 8 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
« no previous file with comments | « content/browser/android/layer_tree_build_helper_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/browser/android/layer_tree_build_helper_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698