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 "platform/testing/WebLayerTreeViewImplForTesting.h" | 5 #include "platform/testing/WebLayerTreeViewImplForTesting.h" |
6 | 6 |
7 #include "base/threading/thread_task_runner_handle.h" | 7 #include "base/threading/thread_task_runner_handle.h" |
8 #include "cc/animation/animation_host.h" | 8 #include "cc/animation/animation_host.h" |
9 #include "cc/animation/animation_timeline.h" | 9 #include "cc/animation/animation_timeline.h" |
10 #include "cc/blink/web_layer_impl.h" | 10 #include "cc/blink/web_layer_impl.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 WebLayerTreeViewImplForTesting::WebLayerTreeViewImplForTesting( | 24 WebLayerTreeViewImplForTesting::WebLayerTreeViewImplForTesting( |
25 const cc::LayerTreeSettings& settings) { | 25 const cc::LayerTreeSettings& settings) { |
26 m_animationHost = cc::AnimationHost::CreateMainInstance(); | 26 m_animationHost = cc::AnimationHost::CreateMainInstance(); |
27 cc::LayerTreeHostInProcess::InitParams params; | 27 cc::LayerTreeHostInProcess::InitParams params; |
28 params.client = this; | 28 params.client = this; |
29 params.settings = &settings; | 29 params.settings = &settings; |
30 params.main_task_runner = base::ThreadTaskRunnerHandle::Get(); | 30 params.main_task_runner = base::ThreadTaskRunnerHandle::Get(); |
31 params.task_graph_runner = &m_taskGraphRunner; | 31 params.task_graph_runner = &m_taskGraphRunner; |
32 params.mutator_host = m_animationHost.get(); | 32 params.mutator_host = m_animationHost.get(); |
| 33 params.image_worker_task_runner = nullptr; |
33 m_layerTreeHost = | 34 m_layerTreeHost = |
34 cc::LayerTreeHostInProcess::CreateSingleThreaded(this, ¶ms); | 35 cc::LayerTreeHostInProcess::CreateSingleThreaded(this, ¶ms); |
35 ASSERT(m_layerTreeHost); | 36 ASSERT(m_layerTreeHost); |
36 } | 37 } |
37 | 38 |
38 WebLayerTreeViewImplForTesting::~WebLayerTreeViewImplForTesting() {} | 39 WebLayerTreeViewImplForTesting::~WebLayerTreeViewImplForTesting() {} |
39 | 40 |
40 // static | 41 // static |
41 cc::LayerTreeSettings | 42 cc::LayerTreeSettings |
42 WebLayerTreeViewImplForTesting::defaultLayerTreeSettings() { | 43 WebLayerTreeViewImplForTesting::defaultLayerTreeSettings() { |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 void WebLayerTreeViewImplForTesting::setHaveScrollEventHandlers( | 207 void WebLayerTreeViewImplForTesting::setHaveScrollEventHandlers( |
207 bool haveEentHandlers) { | 208 bool haveEentHandlers) { |
208 m_layerTreeHost->GetLayerTree()->SetHaveScrollEventHandlers(haveEentHandlers); | 209 m_layerTreeHost->GetLayerTree()->SetHaveScrollEventHandlers(haveEentHandlers); |
209 } | 210 } |
210 | 211 |
211 bool WebLayerTreeViewImplForTesting::haveScrollEventHandlers() const { | 212 bool WebLayerTreeViewImplForTesting::haveScrollEventHandlers() const { |
212 return m_layerTreeHost->GetLayerTree()->have_scroll_event_handlers(); | 213 return m_layerTreeHost->GetLayerTree()->have_scroll_event_handlers(); |
213 } | 214 } |
214 | 215 |
215 } // namespace blink | 216 } // namespace blink |
OLD | NEW |