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

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

Issue 22763003: Fix GetSnapshotFromRenderer stalling when capturing while between navigating to certain pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/thread_proxy.h" 5 #include "cc/trees/thread_proxy.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 ThreadProxy::~ThreadProxy() { 105 ThreadProxy::~ThreadProxy() {
106 TRACE_EVENT0("cc", "ThreadProxy::~ThreadProxy"); 106 TRACE_EVENT0("cc", "ThreadProxy::~ThreadProxy");
107 DCHECK(IsMainThread()); 107 DCHECK(IsMainThread());
108 DCHECK(!started_); 108 DCHECK(!started_);
109 } 109 }
110 110
111 bool ThreadProxy::CompositeAndReadback(void* pixels, gfx::Rect rect) { 111 bool ThreadProxy::CompositeAndReadback(void* pixels, gfx::Rect rect) {
112 TRACE_EVENT0("cc", "ThreadProxy::CompositeAndReadback"); 112 TRACE_EVENT0("cc", "ThreadProxy::CompositeAndReadback");
113 DCHECK(IsMainThread()); 113 DCHECK(IsMainThread());
114 DCHECK(layer_tree_host_); 114 DCHECK(layer_tree_host_);
115 DCHECK(!defer_commits_); 115
116 if (defer_commits_) {
117 TRACE_EVENT0("cc", "CompositeAndReadback_DeferCommit");
118 return false;
119 }
116 120
117 if (!layer_tree_host_->InitializeOutputSurfaceIfNeeded()) { 121 if (!layer_tree_host_->InitializeOutputSurfaceIfNeeded()) {
118 TRACE_EVENT0("cc", "CompositeAndReadback_EarlyOut_LR_Uninitialized"); 122 TRACE_EVENT0("cc", "CompositeAndReadback_EarlyOut_LR_Uninitialized");
119 return false; 123 return false;
120 } 124 }
121 125
122 // Perform a synchronous commit. 126 // Perform a synchronous commit.
123 { 127 {
124 DebugScopedSetMainThreadBlocked main_thread_blocked(this); 128 DebugScopedSetMainThreadBlocked main_thread_blocked(this);
125 CompletionEvent begin_frame_sent_to_main_thread_completion; 129 CompletionEvent begin_frame_sent_to_main_thread_completion;
(...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1506 DCHECK(layer_tree_host_impl_->settings().impl_side_painting); 1510 DCHECK(layer_tree_host_impl_->settings().impl_side_painting);
1507 completion_event_for_commit_held_on_tree_activation_->Signal(); 1511 completion_event_for_commit_held_on_tree_activation_->Signal();
1508 completion_event_for_commit_held_on_tree_activation_ = NULL; 1512 completion_event_for_commit_held_on_tree_activation_ = NULL;
1509 } 1513 }
1510 1514
1511 commit_to_activate_duration_history_.InsertSample( 1515 commit_to_activate_duration_history_.InsertSample(
1512 base::TimeTicks::HighResNow() - commit_complete_time_); 1516 base::TimeTicks::HighResNow() - commit_complete_time_);
1513 } 1517 }
1514 1518
1515 } // namespace cc 1519 } // 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