This is a reland of c1916c34fe
As it turns out, benches are not always given a canvas.
Original change's description:
> Remove use of legacy display globals.
>
> In the ongoing effort to remove the display globals from Skia, allow
> their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
> in a normal Skia build and remove all use from Skia code.
>
> Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
Change-Id: I61a2ac058fafc99653e3304876cf4b97350dac8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322490
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This reverts commit c1916c34fe.
Reason for revert: Bots unhappy
Original change's description:
> Remove use of legacy display globals.
>
> In the ongoing effort to remove the display globals from Skia, allow
> their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
> in a normal Skia build and remove all use from Skia code.
>
> Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
TBR=djsollen@google.com,bungeman@google.com,herb@google.com,reed@google.com
Change-Id: I365d2b1d19241a90130bc1b59663651817966f63
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322400
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
In the ongoing effort to remove the display globals from Skia, allow
their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
in a normal Skia build and remove all use from Skia code.
Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Mechanically updated via Xcode "Replace Regular Expression":
typedef (.*) INHERITED;
-->
using INHERITED = $1;
The ClangTidy approach generated an even larger CL which would have
required a significant amount of hand-tweaking to be usable.
Change-Id: I671dc9d9efdf6d60151325c8d4d13fad7e10a15b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314999
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This fixes a large number of SkSL namespaces which were labeled as if
they were anonymous, and also a handful of other mislabeled namespaces.
Missing namespace-end comments have been added throughout.
A number of diffs are just indentation-related (adjusting 1- or 3-
space indents to 2-space).
Change-Id: I6c62052a0d3aea4ae12ca07e0c2a8587b2fce4ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308503
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This almost gets gms to be iwyu clean. The last bit is around gm.cpp
and the tracing framework and its use of atomic. Will also need a way
of keeping things from regressing, which is difficult due to needing to
do this outside-in.
Change-Id: I1393531e99da8b0f1a29f55c53c86d53f459af7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211593
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Current strategy: everything from the top
Things to look at first are the manual changes:
- added tools/rewrite_includes.py
- removed -Idirectives from BUILD.gn
- various compile.sh simplifications
- tweak tools/embed_resources.py
- update gn/find_headers.py to write paths from the top
- update gn/gn_to_bp.py SkUserConfig.h layout
so that #include "include/config/SkUserConfig.h" always
gets the header we want.
No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
sk_tool_utils doesn't really fit the naming convention
the rest of code under tools/ tends to use.
Change-Id: I45326a174101c6eb4b6149e9c742f658f2fd23b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202313
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Rather that returning nullptr for a recording
canvas, return a raster canvas instead.
R=reed@google.com,robertphillips@google.com
Bug: skia:
Change-Id: I211d8ef368b9aec6d14cc72d1652ac6a03f3fa7b
Reviewed-on: https://skia-review.googlesource.com/151666
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Many tests and examples use drawText with
a guess of how long the text is in bytes,
or a call to strlen(). Add a helper to
SkCanvas to simplify these examples.
Add another helper for SkString.
R=reed@google.com
Change-Id: I0204a31e938f065606f08ee7cd9a6b36db791ee2
Reviewed-on: https://skia-review.googlesource.com/13642
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
gm.h includes sk_tool_utils.h but does not use it.
The bulk of this CL makes each gm that uses sk_tool_utils include it.
sk_tool_utils.h also provided SkRandom and SkTDArray,
so a couple GMs add those headers too.
Change-Id: Ieb2a7c542f0ca89c3223f744fc11b0ff37af36c1
Reviewed-on: https://skia-review.googlesource.com/10014
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
BUG=skia:
Change-Id: I653ff55bc1164ddae4b03967f2f54bb5fece5a33
Reviewed-on: https://skia-review.googlesource.com/9722
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
- perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter
This reverts commit 3ed485f424.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2992
Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8
Reviewed-on: https://skia-review.googlesource.com/2992
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
'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