Commit a2f973de authored by Miguel Casas's avatar Miguel Casas Committed by Commit Bot

CanvasResourceDispatcher: add interesting TRACE_EVENT0()

This CL adds TRACE_EVENT0() to some important CanvasResourceDispatcher
methods: DispatchFrame{Sync}() and PrepareFrame(), which are now used
more frequently, for lowLatency cases.

Bug: 869161
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I66dfd2f47eaba0183d34c5e1f09f759d6f0fcf1b
Reviewed-on: https://chromium-review.googlesource.com/1161974Reviewed-by: default avatarFernando Serboncini <fserb@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580634}
parent 5d179655
......@@ -131,6 +131,7 @@ void CanvasResourceDispatcher::DispatchFrameSync(
base::TimeTicks commit_start_time,
const SkIRect& damage_rect,
bool needs_vertical_flip) {
TRACE_EVENT0("blink", "CanvasResourceDispatcher::DispatchFrameSync");
viz::CompositorFrame frame;
if (!PrepareFrame(std::move(canvas_resource), commit_start_time, damage_rect,
needs_vertical_flip, &frame)) {
......@@ -150,6 +151,7 @@ void CanvasResourceDispatcher::DispatchFrame(
base::TimeTicks commit_start_time,
const SkIRect& damage_rect,
bool needs_vertical_flip) {
TRACE_EVENT0("blink", "CanvasResourceDispatcher::DispatchFrame");
viz::CompositorFrame frame;
if (!PrepareFrame(std::move(canvas_resource), commit_start_time, damage_rect,
needs_vertical_flip, &frame)) {
......@@ -168,6 +170,7 @@ bool CanvasResourceDispatcher::PrepareFrame(
const SkIRect& damage_rect,
bool needs_vertical_flip,
viz::CompositorFrame* frame) {
TRACE_EVENT0("blink", "CanvasResourceDispatcher::PrepareFrame");
if (!canvas_resource || !VerifyImageSize(canvas_resource->Size()))
return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment