| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "cc/test/layer_tree_host_remote_for_testing.h" | 5 #include "cc/test/layer_tree_host_remote_for_testing.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "cc/animation/animation_host.h" | 8 #include "cc/animation/animation_host.h" |
| 9 #include "cc/blimp/compositor_proto_state.h" | 9 #include "cc/blimp/compositor_proto_state.h" |
| 10 #include "cc/blimp/compositor_state_deserializer.h" | 10 #include "cc/blimp/compositor_state_deserializer.h" |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 params.shared_bitmap_manager = shared_bitmap_manager; | 251 params.shared_bitmap_manager = shared_bitmap_manager; |
| 252 params.gpu_memory_buffer_manager = gpu_memory_buffer_manager; | 252 params.gpu_memory_buffer_manager = gpu_memory_buffer_manager; |
| 253 params.task_graph_runner = task_graph_runner; | 253 params.task_graph_runner = task_graph_runner; |
| 254 params.settings = &settings; | 254 params.settings = &settings; |
| 255 params.main_task_runner = main_task_runner; | 255 params.main_task_runner = main_task_runner; |
| 256 params.animation_host = AnimationHost::CreateMainInstance(); | 256 params.animation_host = AnimationHost::CreateMainInstance(); |
| 257 | 257 |
| 258 return LayerTreeHostInProcess::CreateThreaded(impl_task_runner, ¶ms); | 258 return LayerTreeHostInProcess::CreateThreaded(impl_task_runner, ¶ms); |
| 259 } | 259 } |
| 260 | 260 |
| 261 void LayerTreeHostRemoteForTesting::DispatchDrawAndSwapCallbacks() { | 261 void LayerTreeHostRemoteForTesting::DispatchDrawAndSubmitCallbacks() { |
| 262 // Don't dispatch callbacks right after the commit on the remote host. Since | 262 // Don't dispatch callbacks right after the commit on the remote host. Since |
| 263 // tests rely on CompositorFrames being swapped on the CompositorFrameSink, | 263 // tests rely on CompositorFrames being swapped on the CompositorFrameSink, |
| 264 // we wait for these callbacks from the LayerTreeHostInProcess. | 264 // we wait for these callbacks from the LayerTreeHostInProcess. |
| 265 } | 265 } |
| 266 | 266 |
| 267 bool LayerTreeHostRemoteForTesting::ShouldRetainClientScroll( | 267 bool LayerTreeHostRemoteForTesting::ShouldRetainClientScroll( |
| 268 int engine_layer_id, | 268 int engine_layer_id, |
| 269 const gfx::ScrollOffset& new_offset) { | 269 const gfx::ScrollOffset& new_offset) { |
| 270 return false; | 270 return false; |
| 271 } | 271 } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 301 | 301 |
| 302 // The only case where the remote host would give a compositor update is if | 302 // The only case where the remote host would give a compositor update is if |
| 303 // they wanted the main frame to go till the commit pipeline stage. So | 303 // they wanted the main frame to go till the commit pipeline stage. So |
| 304 // request one to make sure that the in process main frame also goes till | 304 // request one to make sure that the in process main frame also goes till |
| 305 // the commit step. | 305 // the commit step. |
| 306 layer_tree_host_in_process_->SetNeedsCommit(); | 306 layer_tree_host_in_process_->SetNeedsCommit(); |
| 307 } | 307 } |
| 308 } | 308 } |
| 309 | 309 |
| 310 } // namespace cc | 310 } // namespace cc |
| OLD | NEW |