| 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 25 matching lines...) Expand all Loading... |
| 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_ = cc::LayerTreeHost::CreateSingleThreaded( | 45 layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded( |
| 46 this, this, NULL, settings, base::MessageLoopProxy::current()); | 46 this, this, NULL, 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 177 |
| 178 void WebLayerTreeViewImplForTesting::registerSelection( | 178 void WebLayerTreeViewImplForTesting::registerSelection( |
| 179 const blink::WebSelectionBound& start, | 179 const blink::WebSelectionBound& start, |
| 180 const blink::WebSelectionBound& end) { | 180 const blink::WebSelectionBound& end) { |
| 181 } | 181 } |
| 182 | 182 |
| 183 void WebLayerTreeViewImplForTesting::clearSelection() { | 183 void WebLayerTreeViewImplForTesting::clearSelection() { |
| 184 } | 184 } |
| 185 | 185 |
| 186 } // namespace content | 186 } // namespace content |
| OLD | NEW |