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

Side by Side Diff: content/test/web_layer_tree_view_impl_for_testing.cc

Issue 400773002: cc: Parameterize the main thread task runner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: WebView fix. Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/test/web_layer_tree_view_impl_for_testing.h" 5 #include "content/test/web_layer_tree_view_impl_for_testing.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "cc/base/switches.h" 10 #include "cc/base/switches.h"
(...skipping 24 matching lines...) Expand all
35 35
36 void WebLayerTreeViewImplForTesting::Initialize() { 36 void WebLayerTreeViewImplForTesting::Initialize() {
37 cc::LayerTreeSettings settings; 37 cc::LayerTreeSettings settings;
38 38
39 // For web contents, layer transforms should scale up the contents of layers 39 // For web contents, layer transforms should scale up the contents of layers
40 // to keep content always crisp when possible. 40 // to keep content always crisp when possible.
41 settings.layer_transforms_should_scale_layer_contents = true; 41 settings.layer_transforms_should_scale_layer_contents = true;
42 42
43 // Accelerated animations are enabled for unit tests. 43 // Accelerated animations are enabled for unit tests.
44 settings.accelerated_animation_enabled = true; 44 settings.accelerated_animation_enabled = true;
45 layer_tree_host_ = 45 layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded(
46 cc::LayerTreeHost::CreateSingleThreaded(this, this, NULL, settings); 46 this, this, NULL, settings, base::MessageLoopProxy::current());
47 DCHECK(layer_tree_host_); 47 DCHECK(layer_tree_host_);
48 } 48 }
49 49
50 void WebLayerTreeViewImplForTesting::setSurfaceReady() { 50 void WebLayerTreeViewImplForTesting::setSurfaceReady() {
51 layer_tree_host_->SetLayerTreeHostClientReady(); 51 layer_tree_host_->SetLayerTreeHostClientReady();
52 } 52 }
53 53
54 void WebLayerTreeViewImplForTesting::setRootLayer( 54 void WebLayerTreeViewImplForTesting::setRootLayer(
55 const blink::WebLayer& root) { 55 const blink::WebLayer& root) {
56 layer_tree_host_->SetRootLayer( 56 layer_tree_host_->SetRootLayer(
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 void WebLayerTreeViewImplForTesting::registerSelection( 170 void WebLayerTreeViewImplForTesting::registerSelection(
171 const blink::WebSelectionBound& start, 171 const blink::WebSelectionBound& start,
172 const blink::WebSelectionBound& end) { 172 const blink::WebSelectionBound& end) {
173 } 173 }
174 174
175 void WebLayerTreeViewImplForTesting::clearSelection() { 175 void WebLayerTreeViewImplForTesting::clearSelection() {
176 } 176 }
177 177
178 } // namespace content 178 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | mojo/examples/compositor_app/compositor_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698