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

Unified Diff: cc/trees/thread_proxy.cc

Issue 83183005: Add synthetic delay points for latency testing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Fixed PerfRasterWorkerPool. 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 | « cc/resources/raster_worker_pool_perftest.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index 0518a6b4440a4c4b1beca46510ef36820d41d376..c5727c44cfc074703ac10caa3d3c77f93a577cda 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -9,6 +9,7 @@
#include "base/auto_reset.h"
#include "base/bind.h"
#include "base/debug/trace_event.h"
+#include "base/debug/trace_event_synthetic_delay.h"
#include "base/metrics/histogram.h"
#include "cc/base/swap_promise.h"
#include "cc/debug/benchmark_instrumentation.h"
@@ -758,6 +759,7 @@ void ThreadProxy::ScheduledActionSendBeginMainFrame() {
void ThreadProxy::BeginMainFrame(
scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) {
TRACE_EVENT0("cc", "ThreadProxy::BeginMainFrame");
+ TRACE_EVENT_SYNTHETIC_DELAY_BEGIN("cc.BeginMainFrame");
DCHECK(IsMainThread());
if (!layer_tree_host())
@@ -839,6 +841,7 @@ void ThreadProxy::BeginMainFrame(
layer_tree_host()->RecreateUIResources();
layer_tree_host()->Layout();
+ TRACE_EVENT_SYNTHETIC_DELAY_END("cc.BeginMainFrame");
// Clear the commit flag after updating animations and layout here --- objects
// that only layout when painted will trigger another SetNeedsCommit inside
@@ -1077,6 +1080,7 @@ DrawSwapReadbackResult ThreadProxy::DrawSwapReadbackInternal(
bool forced_draw,
bool swap_requested,
bool readback_requested) {
+ TRACE_EVENT_SYNTHETIC_DELAY("cc.DrawAndSwap");
DrawSwapReadbackResult result;
result.did_draw = false;
result.did_swap = false;
« no previous file with comments | « cc/resources/raster_worker_pool_perftest.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698