Commit Graph

5 Commits

Author SHA1 Message Date
mtklein
dbfd7ab108 Replace a lot of 'static const' with 'constexpr' or 'const'.
'static const' means, there must be at most one of these, and initialize it at
compile time if possible or runtime if necessary.  This leads to unexpected
code execution, and TSAN* will complain about races on the guard variables.

Generally 'constexpr' or 'const' are better choices.  Neither can cause races:
they're either intialized at compile time (constexpr) or intialized each time
independently (const).

This CL prefers constexpr where possible, and uses const where not.  It even
prefers constexpr over const where they don't make a difference... I want to have
lots of examples of constexpr for people to see and mimic.

The scoped-to-class static has nothing to do with any of this, and is not changed.

* Not yet on the bots, which use an older TSAN.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2300623005

Review-Url: https://codereview.chromium.org/2300623005
2016-09-01 11:24:54 -07:00
reed
e8f3062a36 switch surface to sk_sp
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1817383002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1817383002
2016-03-23 18:59:25 -07:00
reed
9ce9d6772d update callsites for Make image factories
not forced yet, as we still have the build-guard. waiting on chrome CL

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1810813003

TBR=

Review URL: https://codereview.chromium.org/1810813003
2016-03-17 10:51:11 -07:00
fmalita
aed4d32de9 SkBitmapProcState rounding bias
Epsilon bias to keep bitmap sample rounding consistent with geometry
rounding.

Also update the GM to draw an outer border + drop uninteresting
scales in favor of negative scale variants.

BUG=skia:4680,skia:4649
R=reed@google.com,caryclark@google.com,mtklein@google.com

Review URL: https://codereview.chromium.org/1527633002
2015-12-15 06:48:48 -08:00
fmalita
cad54b5366 New GM: image_scale_aligned
To verify alignment for various image scaling modes.

BUG=skia:4649
R=reed@google.com

Review URL: https://codereview.chromium.org/1514923002
2015-12-11 11:03:27 -08:00