Maintain SkPaint in GraphicsContextState.

The aim is to avoid SkPaint setup time for the common case of filling and stroking shapes. We can't entirely do that, as some of the paint content is not controlled by GraphicsContextState (such as text or temporary paint state set for specific draw operations).

Perf tests on the record_and_rasterize micro-bench indicate a 1-3% average improvement on record times.

BUG=343240
R=adamk@chromium.org, fmalita@chromium.org, senorblanco@chromium.org

Review URL: https://codereview.chromium.org/169283008

git-svn-id: svn://svn.chromium.org/blink/trunk@168536 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Convert some pixel tests in fast/canvas into ref tests.

This change removes many pixel baselines that were trivial enough
to be expressed as reference html. Some of the tests were slightly
modified to make them work as ref tests.

R=senorblanco@chromium.org
BUG=349536

Review URL: https://codereview.chromium.org/187393007

git-svn-id: svn://svn.chromium.org/blink/trunk@168540 bbb929c8-8fbe-4397-9dbb-9b2b20218538
UMA histograms to measure whether / how long blank text is rendered for loading web fonts

This patch adds two UMA metrics:

WebFont.BlankTextShownTime histogram tracks the time we spent showing
blank text. This measures the time between when the "loading fallback"
font is drawn for the first time, and when FontData for the downloaded
web font is created.

WebFont.HadBlankText is recorded once per page load if the page uses
any web fonts. The value is 1 if we ended up showing blank text at
least once, 0 otherwise.

BUG=345839
TEST=Manually tested with chrome://histograms

Review URL: https://codereview.chromium.org/180273020

git-svn-id: svn://svn.chromium.org/blink/trunk@168541 bbb929c8-8fbe-4397-9dbb-9b2b20218538