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

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: Begin delay on one thread and end it on another. Created 7 years 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
Index: cc/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index 9624a2dc293bfefdc4c2f50e386a4336addd8c92..2e40b33ecd0cc9820cf05f4b6e1ae607de1b8d0f 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"
@@ -761,6 +762,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())
@@ -842,6 +844,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
@@ -1086,6 +1089,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;

Powered by Google App Engine
This is Rietveld 408576698