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

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

Issue 2790173005: cc: Dump scheduler and tile manager state when commit is blocked. (Closed)
Patch Set: vmpstr review Created 3 years, 8 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_impl.cc ('k') | no next file » | 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/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 task_runner_provider_->blocking_main_thread_task_runner()); 258 task_runner_provider_->blocking_main_thread_task_runner());
259 259
260 bool hold_commit_for_activation = commit_waits_for_activation_; 260 bool hold_commit_for_activation = commit_waits_for_activation_;
261 commit_waits_for_activation_ = false; 261 commit_waits_for_activation_ = false;
262 CompletionEvent completion; 262 CompletionEvent completion;
263 ImplThreadTaskRunner()->PostTask( 263 ImplThreadTaskRunner()->PostTask(
264 FROM_HERE, base::Bind(&ProxyImpl::NotifyReadyToCommitOnImpl, 264 FROM_HERE, base::Bind(&ProxyImpl::NotifyReadyToCommitOnImpl,
265 base::Unretained(proxy_impl_.get()), &completion, 265 base::Unretained(proxy_impl_.get()), &completion,
266 layer_tree_host_, begin_main_frame_start_time, 266 layer_tree_host_, begin_main_frame_start_time,
267 hold_commit_for_activation)); 267 hold_commit_for_activation));
268 completion.Wait(); 268 // TODO(sunnyps): Remove this code once crbug.com/668892 is fixed.
269 // content/common/content_constants_internal.cc defines hung renderer delay
270 // as 30s so choose something less than that but still sufficiently long.
271 static constexpr base::TimeDelta kDumpDelay =
272 base::TimeDelta::FromSeconds(20);
273 if (!completion.TimedWait(kDumpDelay)) {
274 ImplThreadTaskRunner()->PostTask(
275 FROM_HERE, base::Bind(&ProxyImpl::DumpForBeginMainFrameHang,
276 base::Unretained(proxy_impl_.get())));
277 completion.Wait();
278 }
269 } 279 }
270 280
271 current_pipeline_stage_ = NO_PIPELINE_STAGE; 281 current_pipeline_stage_ = NO_PIPELINE_STAGE;
272 layer_tree_host_->CommitComplete(); 282 layer_tree_host_->CommitComplete();
273 layer_tree_host_->DidBeginMainFrame(); 283 layer_tree_host_->DidBeginMainFrame();
274 } 284 }
275 285
276 bool ProxyMain::IsStarted() const { 286 bool ProxyMain::IsStarted() const {
277 DCHECK(IsMainThread()); 287 DCHECK(IsMainThread());
278 return started_; 288 return started_;
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 515
506 bool ProxyMain::IsImplThread() const { 516 bool ProxyMain::IsImplThread() const {
507 return task_runner_provider_->IsImplThread(); 517 return task_runner_provider_->IsImplThread();
508 } 518 }
509 519
510 base::SingleThreadTaskRunner* ProxyMain::ImplThreadTaskRunner() { 520 base::SingleThreadTaskRunner* ProxyMain::ImplThreadTaskRunner() {
511 return task_runner_provider_->ImplThreadTaskRunner(); 521 return task_runner_provider_->ImplThreadTaskRunner();
512 } 522 }
513 523
514 } // namespace cc 524 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/proxy_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698