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

Side by Side Diff: cc/trees/proxy_main.cc

Issue 2158973002: cc: Clean up LayerTreeTest and TestHooks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: proxy-impls: test Created 4 years, 5 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/trees/proxy_main.h ('k') | cc/trees/remote_channel_impl.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/trees/proxy_main.h" 5 #include "cc/trees/proxy_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 238
239 // This CapturePostTasks should be destroyed before CommitComplete() is 239 // This CapturePostTasks should be destroyed before CommitComplete() is
240 // called since that goes out to the embedder, and we want the embedder 240 // called since that goes out to the embedder, and we want the embedder
241 // to receive its callbacks before that. 241 // to receive its callbacks before that.
242 BlockingTaskRunner::CapturePostTasks blocked( 242 BlockingTaskRunner::CapturePostTasks blocked(
243 task_runner_provider_->blocking_main_thread_task_runner()); 243 task_runner_provider_->blocking_main_thread_task_runner());
244 244
245 bool hold_commit_for_activation = commit_waits_for_activation_; 245 bool hold_commit_for_activation = commit_waits_for_activation_;
246 commit_waits_for_activation_ = false; 246 commit_waits_for_activation_ = false;
247 CompletionEvent completion; 247 CompletionEvent completion;
248 channel_main_->StartCommitOnImpl(&completion, layer_tree_host_, 248 channel_main_->NotifyReadyToCommitOnImpl(&completion, layer_tree_host_,
249 begin_main_frame_start_time, 249 begin_main_frame_start_time,
250 hold_commit_for_activation); 250 hold_commit_for_activation);
251 completion.Wait(); 251 completion.Wait();
252 } 252 }
253 253
254 current_pipeline_stage_ = NO_PIPELINE_STAGE; 254 current_pipeline_stage_ = NO_PIPELINE_STAGE;
255 layer_tree_host_->CommitComplete(); 255 layer_tree_host_->CommitComplete();
256 layer_tree_host_->DidBeginMainFrame(); 256 layer_tree_host_->DidBeginMainFrame();
257 } 257 }
258 258
259 void ProxyMain::FinishAllRendering() { 259 void ProxyMain::FinishAllRendering() {
260 DCHECK(IsMainThread()); 260 DCHECK(IsMainThread());
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 return false; 455 return false;
456 channel_main_->SetNeedsCommitOnImpl(); 456 channel_main_->SetNeedsCommitOnImpl();
457 return true; 457 return true;
458 } 458 }
459 459
460 bool ProxyMain::IsMainThread() const { 460 bool ProxyMain::IsMainThread() const {
461 return task_runner_provider_->IsMainThread(); 461 return task_runner_provider_->IsMainThread();
462 } 462 }
463 463
464 } // namespace cc 464 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/proxy_main.h ('k') | cc/trees/remote_channel_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698