OLD | NEW |
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 26 matching lines...) Expand all Loading... |
37 void WebLayerTreeViewImplForTesting::Initialize() { | 37 void WebLayerTreeViewImplForTesting::Initialize() { |
38 cc::LayerTreeSettings settings; | 38 cc::LayerTreeSettings settings; |
39 | 39 |
40 // For web contents, layer transforms should scale up the contents of layers | 40 // For web contents, layer transforms should scale up the contents of layers |
41 // to keep content always crisp when possible. | 41 // to keep content always crisp when possible. |
42 settings.layer_transforms_should_scale_layer_contents = true; | 42 settings.layer_transforms_should_scale_layer_contents = true; |
43 | 43 |
44 // Accelerated animations are enabled for unit tests. | 44 // Accelerated animations are enabled for unit tests. |
45 settings.accelerated_animation_enabled = true; | 45 settings.accelerated_animation_enabled = true; |
46 layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded( | 46 layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded( |
47 this, | 47 this, this, nullptr, nullptr, nullptr, settings, |
48 this, | 48 base::MessageLoopProxy::current(), nullptr); |
49 nullptr, | |
50 nullptr, | |
51 settings, | |
52 base::MessageLoopProxy::current(), | |
53 nullptr); | |
54 DCHECK(layer_tree_host_); | 49 DCHECK(layer_tree_host_); |
55 } | 50 } |
56 | 51 |
57 void WebLayerTreeViewImplForTesting::setRootLayer( | 52 void WebLayerTreeViewImplForTesting::setRootLayer( |
58 const blink::WebLayer& root) { | 53 const blink::WebLayer& root) { |
59 layer_tree_host_->SetRootLayer( | 54 layer_tree_host_->SetRootLayer( |
60 static_cast<const cc_blink::WebLayerImpl*>(&root)->layer()); | 55 static_cast<const cc_blink::WebLayerImpl*>(&root)->layer()); |
61 } | 56 } |
62 | 57 |
63 void WebLayerTreeViewImplForTesting::clearRootLayer() { | 58 void WebLayerTreeViewImplForTesting::clearRootLayer() { |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 | 191 |
197 void WebLayerTreeViewImplForTesting::registerSelection( | 192 void WebLayerTreeViewImplForTesting::registerSelection( |
198 const blink::WebSelectionBound& start, | 193 const blink::WebSelectionBound& start, |
199 const blink::WebSelectionBound& end) { | 194 const blink::WebSelectionBound& end) { |
200 } | 195 } |
201 | 196 |
202 void WebLayerTreeViewImplForTesting::clearSelection() { | 197 void WebLayerTreeViewImplForTesting::clearSelection() { |
203 } | 198 } |
204 | 199 |
205 } // namespace content | 200 } // namespace content |
OLD | NEW |