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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 149053006: cc: Add TRACE_EVENTs to SingleThreadProxy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/single_thread_proxy.cc
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index f3f028b22d236693a985dae71a246ad86c760487..09cbfd5bed04dc37956190c0207349f993d54ed1 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -83,6 +83,7 @@ bool SingleThreadProxy::CompositeAndReadback(void* pixels,
void SingleThreadProxy::FinishAllRendering() {
DCHECK(Proxy::IsMainThread());
+ TRACE_EVENT0("cc", "SingleThreadProxy::FinishAllRendering");
enne (OOO) 2014/01/30 00:03:18 nit: put this trace before the DCHECK for consiste
danakj 2014/01/30 00:06:25 Oh I did it after for consistency with what I saw
{
DebugScopedSetImplThread impl(this);
layer_tree_host_impl_->FinishAllRendering();
@@ -95,11 +96,13 @@ bool SingleThreadProxy::IsStarted() const {
}
void SingleThreadProxy::SetLayerTreeHostClientReady() {
+ TRACE_EVENT0("cc", "SingleThreadProxy::SetLayerTreeHostClientReady");
// Scheduling is controlled by the embedder in the single thread case, so
// nothing to do.
}
void SingleThreadProxy::SetVisible(bool visible) {
+ TRACE_EVENT0("cc", "SingleThreadProxy::SetVisible");
DebugScopedSetImplThread impl(this);
layer_tree_host_impl_->SetVisible(visible);
@@ -176,17 +179,20 @@ const RendererCapabilities& SingleThreadProxy::GetRendererCapabilities() const {
}
void SingleThreadProxy::SetNeedsAnimate() {
+ TRACE_EVENT0("cc", "SingleThreadProxy::SetNeedsAnimate");
DCHECK(Proxy::IsMainThread());
client_->ScheduleAnimation();
}
void SingleThreadProxy::SetNeedsUpdateLayers() {
+ TRACE_EVENT0("cc", "SingleThreadProxy::SetNeedsUpdateLayers");
DCHECK(Proxy::IsMainThread());
client_->ScheduleComposite();
}
void SingleThreadProxy::DoCommit(scoped_ptr<ResourceUpdateQueue> queue) {
DCHECK(Proxy::IsMainThread());
+ TRACE_EVENT0("cc", "SingleThreadProxy::DoCommit");
// Commit immediately.
{
DebugScopedSetMainThreadBlocked main_thread_blocked(this);
@@ -245,6 +251,7 @@ void SingleThreadProxy::SetNeedsCommit() {
}
void SingleThreadProxy::SetNeedsRedraw(const gfx::Rect& damage_rect) {
+ TRACE_EVENT0("cc", "SingleThreadProxy::SetNeedsRedraw");
SetNeedsRedrawRectOnImplThread(damage_rect);
client_->ScheduleComposite();
}
@@ -281,6 +288,8 @@ void SingleThreadProxy::Stop() {
}
void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) {
+ TRACE_EVENT1(
+ "cc", "SingleThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw);
DCHECK(Proxy::IsImplThread());
UpdateBackgroundAnimateTicking();
}
@@ -321,6 +330,8 @@ void SingleThreadProxy::PostAnimationEventsToMainThreadOnImplThread(
scoped_ptr<AnimationEventsVector> events,
base::Time wall_clock_time) {
DCHECK(Proxy::IsImplThread());
+ TRACE_EVENT0(
+ "cc", "SingleThreadProxy::PostAnimationEventsToMainThreadOnImplThread");
DebugScopedSetMainThread main(this);
layer_tree_host_->SetAnimationEvents(events.Pass(), wall_clock_time);
}
@@ -360,6 +371,7 @@ void SingleThreadProxy::SendManagedMemoryStats() {
bool SingleThreadProxy::IsInsideDraw() { return inside_draw_; }
void SingleThreadProxy::DidLoseOutputSurfaceOnImplThread() {
+ TRACE_EVENT0("cc", "SingleThreadProxy::DidLoseOutputSurfaceOnImplThread");
// Cause a commit so we can notice the lost context.
SetNeedsCommitOnImplThread();
client_->DidAbortSwapBuffers();
@@ -370,12 +382,14 @@ void SingleThreadProxy::DidSwapBuffersOnImplThread() {
}
void SingleThreadProxy::OnSwapBuffersCompleteOnImplThread() {
+ TRACE_EVENT0("cc", "SingleThreadProxy::OnSwapBuffersCompleteOnImplThread");
client_->DidCompleteSwapBuffers();
}
// Called by the legacy scheduling path (e.g. where render_widget does the
// scheduling)
void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) {
+ TRACE_EVENT0("cc", "SingleThreadProxy::CompositeImmediately");
gfx::Rect device_viewport_damage_rect;
LayerTreeHostImpl::FrameData frame;
@@ -432,6 +446,7 @@ bool SingleThreadProxy::CommitAndComposite(
bool for_readback,
LayerTreeHostImpl::FrameData* frame) {
DCHECK(Proxy::IsMainThread());
+ TRACE_EVENT0("cc", "SingleThreadProxy::CommitAndComposite");
if (!layer_tree_host_->InitializeOutputSurfaceIfNeeded())
return false;
@@ -495,6 +510,7 @@ bool SingleThreadProxy::DoComposite(
bool for_readback,
LayerTreeHostImpl::FrameData* frame) {
DCHECK(!layer_tree_host_->output_surface_lost());
+ TRACE_EVENT0("cc", "SingleThreadProxy::DoComposite");
bool lost_output_surface = false;
{
« 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