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

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

Issue 2843433003: cc: Remove slow BeginMainFrame dump. (Closed)
Patch Set: 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 | « no previous file | 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, 264 FROM_HERE,
265 base::BindOnce(&ProxyImpl::NotifyReadyToCommitOnImpl, 265 base::BindOnce(&ProxyImpl::NotifyReadyToCommitOnImpl,
266 base::Unretained(proxy_impl_.get()), &completion, 266 base::Unretained(proxy_impl_.get()), &completion,
267 layer_tree_host_, begin_main_frame_start_time, 267 layer_tree_host_, begin_main_frame_start_time,
268 hold_commit_for_activation)); 268 hold_commit_for_activation));
269 // TODO(sunnyps): Remove this code once crbug.com/668892 is fixed. 269 completion.Wait();
270 // content/common/content_constants_internal.cc defines hung renderer delay
271 // as 30s so choose something less than that but still sufficiently long.
272 static constexpr base::TimeDelta kDumpDelay =
273 base::TimeDelta::FromSeconds(20);
274 if (!completion.TimedWait(kDumpDelay)) {
275 ImplThreadTaskRunner()->PostTask(
276 FROM_HERE, base::BindOnce(&ProxyImpl::DumpForBeginMainFrameHang,
277 base::Unretained(proxy_impl_.get())));
278 completion.Wait();
279 }
280 } 270 }
281 271
282 current_pipeline_stage_ = NO_PIPELINE_STAGE; 272 current_pipeline_stage_ = NO_PIPELINE_STAGE;
283 layer_tree_host_->CommitComplete(); 273 layer_tree_host_->CommitComplete();
284 layer_tree_host_->DidBeginMainFrame(); 274 layer_tree_host_->DidBeginMainFrame();
285 } 275 }
286 276
287 bool ProxyMain::IsStarted() const { 277 bool ProxyMain::IsStarted() const {
288 DCHECK(IsMainThread()); 278 DCHECK(IsMainThread());
289 return started_; 279 return started_;
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 509
520 bool ProxyMain::IsImplThread() const { 510 bool ProxyMain::IsImplThread() const {
521 return task_runner_provider_->IsImplThread(); 511 return task_runner_provider_->IsImplThread();
522 } 512 }
523 513
524 base::SingleThreadTaskRunner* ProxyMain::ImplThreadTaskRunner() { 514 base::SingleThreadTaskRunner* ProxyMain::ImplThreadTaskRunner() {
525 return task_runner_provider_->ImplThreadTaskRunner(); 515 return task_runner_provider_->ImplThreadTaskRunner();
526 } 516 }
527 517
528 } // namespace cc 518 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698