New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 612585 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Add UMA performance metrics for canvas

Project Member Reported by junov@chromium.org, May 17 2016

Issue description

We need to gather more performance stats from the wild for 2D canvas.

In particular, time per frame spent in rasterization (SkPicture playback), and time per frame spent in various API calls.  The stats should be separated into buckets based on the canvas's rendering mode (SW/GPU/DisplayList).
 
Cc: -xidac...@chromium.org junov@chromium.org
Owner: xidac...@chromium.org
Status: Started (was: Available)
Project Member

Comment 2 by bugdroid1@chromium.org, May 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5aa1628e82232fab9951a2895094a216661271f4

commit 5aa1628e82232fab9951a2895094a216661271f4
Author: xidachen <xidachen@chromium.org>
Date: Thu May 26 03:40:36 2016

Adding performance tracking for canvas API calls

In this CL, we add timer to some of the expensive API calls in 2d canvas.
These API calls includes:
1. drawImage
2. createImageData
3. getImageData
4. putImageData
5. toDataURL

Measuring toBlob will be in another CL, it is more complicated than this
because of its idle scheduling scheme.

BUG= 612585 

Review-Url: https://codereview.chromium.org/1992253002
Cr-Commit-Position: refs/heads/master@{#396105}

[modify] https://crrev.com/5aa1628e82232fab9951a2895094a216661271f4/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] https://crrev.com/5aa1628e82232fab9951a2895094a216661271f4/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
[modify] https://crrev.com/5aa1628e82232fab9951a2895094a216661271f4/tools/metrics/histograms/histograms.xml

Project Member

Comment 3 by bugdroid1@chromium.org, Jun 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/38a83802d7b2af4fc25bbb6d20490fda1cba7700

commit 38a83802d7b2af4fc25bbb6d20490fda1cba7700
Author: xidachen <xidachen@chromium.org>
Date: Tue Jun 07 21:36:20 2016

Change the timer to record the actual drawing time

Currently in the BaseRenderingContext2D.cpp, we put the scoped timer at
the very beginning of some API functions. But that includes timing for
some early exits cases. This CL makes changes such that we do not record
the time for the early exits cases

BUG= 612585 

Review-Url: https://codereview.chromium.org/2047643004
Cr-Commit-Position: refs/heads/master@{#398381}

[modify] https://crrev.com/38a83802d7b2af4fc25bbb6d20490fda1cba7700/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp

Status: Fixed (was: Started)
Project Member

Comment 6 by bugdroid1@chromium.org, Oct 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/353e43e71ccee2891f9c7484f847eafff2c1d55b

commit 353e43e71ccee2891f9c7484f847eafff2c1d55b
Author: xlai <xlai@chromium.org>
Date: Thu Oct 13 17:22:10 2016

Modify Blink.Canvas.toDataURL UMA performance metrics

Previously the Blink.Canvas.toDataURL performance metrics is
collecting PNG encoding data in many separate buckets,
including Blink.Canvas.toDataURL.PNG and all the other
unsupported image types. This is because the previous code
overlooks that toEncodingMimeType function is converting all
unsupported types to "image/png".

I corrected this by putting the UMA data tracking code after
the toEncodingMimeType function, and also remove those buckets
for unsupported image types.

BUG= 612585 

Review-Url: https://codereview.chromium.org/2404223003
Cr-Commit-Position: refs/heads/master@{#425074}

[modify] https://crrev.com/353e43e71ccee2891f9c7484f847eafff2c1d55b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] https://crrev.com/353e43e71ccee2891f9c7484f847eafff2c1d55b/tools/metrics/histograms/histograms.xml

Sign in to add a comment