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

Side by Side Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 855553002: Add more trace events to "benchmark" category (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add tracing to ThreadProxy::DidSwapBuffersCompleteOnImplThread Created 5 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 unified diff | Download patch
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/renderer_host/compositor_impl_android.h" 5 #include "content/browser/renderer_host/compositor_impl_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 #include <android/native_window_jni.h> 8 #include <android/native_window_jni.h>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // vsync. 232 // vsync.
233 composite_on_vsync_trigger_ = COMPOSITE_EVENTUALLY; 233 composite_on_vsync_trigger_ = COMPOSITE_EVENTUALLY;
234 root_window_->RequestVSyncUpdate(); 234 root_window_->RequestVSyncUpdate();
235 DCHECK(WillComposite()); 235 DCHECK(WillComposite());
236 return; 236 return;
237 } 237 }
238 238
239 delay = next_composite - now; 239 delay = next_composite - now;
240 } 240 }
241 } 241 }
242 TRACE_EVENT2("cc", "CompositorImpl::PostComposite", 242 TRACE_EVENT2("cc,benchmark", "CompositorImpl::PostComposite",
243 "trigger", trigger, 243 "trigger", trigger,
244 "delay", delay.InMillisecondsF()); 244 "delay", delay.InMillisecondsF());
245 245
246 DCHECK(composite_on_vsync_trigger_ == DO_NOT_COMPOSITE); 246 DCHECK(composite_on_vsync_trigger_ == DO_NOT_COMPOSITE);
247 if (current_composite_task_) 247 if (current_composite_task_)
248 current_composite_task_->Cancel(); 248 current_composite_task_->Cancel();
249 249
250 // Unretained because we cancel the task on shutdown. 250 // Unretained because we cancel the task on shutdown.
251 current_composite_task_.reset(new base::CancelableClosure( 251 current_composite_task_.reset(new base::CancelableClosure(
252 base::Bind(&CompositorImpl::Composite, base::Unretained(this), trigger))); 252 base::Bind(&CompositorImpl::Composite, base::Unretained(this), trigger)));
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 695
696 void CompositorImpl::SetNeedsAnimate() { 696 void CompositorImpl::SetNeedsAnimate() {
697 needs_animate_ = true; 697 needs_animate_ = true;
698 if (!host_) 698 if (!host_)
699 return; 699 return;
700 700
701 host_->SetNeedsAnimate(); 701 host_->SetNeedsAnimate();
702 } 702 }
703 703
704 } // namespace content 704 } // namespace content
OLDNEW
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698