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

Side by Side Diff: cc/test/layer_tree_host_remote_for_testing.cc

Issue 2409923002: cc: Rename SwapBuffers on CompositorFrameSink to SubmitCompositorFrame (Closed)
Patch Set: swap-to-submit: rebase Created 4 years, 2 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
« no previous file with comments | « cc/test/layer_tree_host_remote_for_testing.h ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 layer_tree_host_remote_->client()->DidInitializeCompositorFrameSink(); 83 layer_tree_host_remote_->client()->DidInitializeCompositorFrameSink();
84 } 84 }
85 void DidFailToInitializeCompositorFrameSink() override { 85 void DidFailToInitializeCompositorFrameSink() override {
86 layer_tree_host_remote_->client()->DidFailToInitializeCompositorFrameSink(); 86 layer_tree_host_remote_->client()->DidFailToInitializeCompositorFrameSink();
87 } 87 }
88 void WillCommit() override {} 88 void WillCommit() override {}
89 void DidCommit() override {} 89 void DidCommit() override {}
90 void DidCommitAndDrawFrame() override { 90 void DidCommitAndDrawFrame() override {
91 layer_tree_host_remote_->client()->DidCommitAndDrawFrame(); 91 layer_tree_host_remote_->client()->DidCommitAndDrawFrame();
92 } 92 }
93 void DidCompleteSwapBuffers() override { 93 void DidReceiveCompositorFrameAck() override {
94 layer_tree_host_remote_->client()->DidCompleteSwapBuffers(); 94 layer_tree_host_remote_->client()->DidReceiveCompositorFrameAck();
95 } 95 }
96 void DidCompletePageScaleAnimation() override { 96 void DidCompletePageScaleAnimation() override {
97 NOTREACHED() << "The remote mode doesn't support sending animations"; 97 NOTREACHED() << "The remote mode doesn't support sending animations";
98 } 98 }
99 99
100 private: 100 private:
101 LayerTreeHostRemoteForTesting* layer_tree_host_remote_; 101 LayerTreeHostRemoteForTesting* layer_tree_host_remote_;
102 }; 102 };
103 103
104 // static 104 // static
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 params.shared_bitmap_manager = shared_bitmap_manager; 252 params.shared_bitmap_manager = shared_bitmap_manager;
253 params.gpu_memory_buffer_manager = gpu_memory_buffer_manager; 253 params.gpu_memory_buffer_manager = gpu_memory_buffer_manager;
254 params.task_graph_runner = task_graph_runner; 254 params.task_graph_runner = task_graph_runner;
255 params.settings = &settings; 255 params.settings = &settings;
256 params.main_task_runner = main_task_runner; 256 params.main_task_runner = main_task_runner;
257 params.animation_host = AnimationHost::CreateMainInstance(); 257 params.animation_host = AnimationHost::CreateMainInstance();
258 258
259 return LayerTreeHostInProcess::CreateThreaded(impl_task_runner, &params); 259 return LayerTreeHostInProcess::CreateThreaded(impl_task_runner, &params);
260 } 260 }
261 261
262 void LayerTreeHostRemoteForTesting::DispatchDrawAndSwapCallbacks() { 262 void LayerTreeHostRemoteForTesting::DispatchDrawAndSubmitCallbacks() {
263 // Don't dispatch callbacks right after the commit on the remote host. Since 263 // Don't dispatch callbacks right after the commit on the remote host. Since
264 // tests rely on CompositorFrames being swapped on the CompositorFrameSink, 264 // tests rely on CompositorFrames being swapped on the CompositorFrameSink,
265 // we wait for these callbacks from the LayerTreeHostInProcess. 265 // we wait for these callbacks from the LayerTreeHostInProcess.
266 } 266 }
267 267
268 bool LayerTreeHostRemoteForTesting::ShouldRetainClientScroll( 268 bool LayerTreeHostRemoteForTesting::ShouldRetainClientScroll(
269 int engine_layer_id, 269 int engine_layer_id,
270 const gfx::ScrollOffset& new_offset) { 270 const gfx::ScrollOffset& new_offset) {
271 return false; 271 return false;
272 } 272 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 311
312 // The only case where the remote host would give a compositor update is if 312 // The only case where the remote host would give a compositor update is if
313 // they wanted the main frame to go till the commit pipeline stage. So 313 // they wanted the main frame to go till the commit pipeline stage. So
314 // request one to make sure that the in process main frame also goes till 314 // request one to make sure that the in process main frame also goes till
315 // the commit step. 315 // the commit step.
316 layer_tree_host_in_process_->SetNeedsCommit(); 316 layer_tree_host_in_process_->SetNeedsCommit();
317 } 317 }
318 } 318 }
319 319
320 } // namespace cc 320 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_host_remote_for_testing.h ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698