This is in prep for compiling with -std=c++14 and -Wno-c++17-extensions
when building with clang. Chrome has encountered problems with
third_party headers that are included both in Skia and other Chrome
sources that produce different code based on whether preprocessor macros
indicate a C++14 or C++17 compilation.
In C++17 they are already inline implicitly. When compiling with C++14
we can get linker errors unless they're explicitly inlined or defined
outside the class. With -Wno-c++17-extensions we can explicitly inline
them in the C++14 build because the warning that would be generated
about using a C++17 language extension is suppressed.
We cannot do this in public headers because we support compiling with
C++14 without suppressing the C++17 language extension warnings.
Bug: chromium:1257145
Change-Id: Iaf5f4c62a398f98dd4ca9b7dfb86f2d5cab21d66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457498
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This CL is mostly mechanical. It:
replaces "src/gpu/GrSurfaceDrawContext.h" #includes with
"src/gpu/v1/SurfaceDrawContext_v1.h" and reorders
replaces "class GrSurfaceDrawContext;" with
"namespace skgpu { namespace v1 { class SurfaceDrawContext; }}"
replaces "GrSurfaceDrawContext*" with "auto" where possible
replaces "rtc" with "sdc"
replaces "surfaceDrawContext" with "sdc"
replaces GrSurfaceDrawContext with skgpu::v1::SurfaceDrawContext
reflows parameters as needed
This CL does not try to:
make skgpu::v1::SurfaceDrawContext V1-only
minimize the skgpu and/or skgpu::v1 prefixes
Those two tasks will be accomplished in follow up CLs. This CL is just trying to get the bulk of the mechanical changes comprehensibly landed.
Bug: skia:11837
Change-Id: I6fe59080249d585df8f5d27c6b67569cdc35842f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433156
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
In the future, the SDC won't be return by SkCanvas/SkDevices and gms/tests that rely on it won't be run. These GMs don't actually require the SDC.
There is also some opportunistic renaming going on.
TBR=michaelludwig@google.com
Change-Id: I15cbaf69269892fbbf229c0263b567425049c3f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415167
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit b8416d27be.
Reason for revert: pre-abandon context failures
Original change's description:
> Retract the SDC from GMs where possible
>
> In the future, the SDC won't be return by SkCanvas/SkDevices and gms/tests that rely on it won't be run. These GMs don't actually require the SDC.
>
> There is also some opportunistic renaming going on.
>
> Change-Id: Ib137232f4352fce586105298cda00a697d2efade
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414902
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
TBR=robertphillips@google.com,michaelludwig@google.com
Change-Id: I7675996c43ac94e70d60fdadd3e0203531de8289
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415159
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
In the future, the SDC won't be return by SkCanvas/SkDevices and gms/tests that rely on it won't be run. These GMs don't actually require the SDC.
There is also some opportunistic renaming going on.
Change-Id: Ib137232f4352fce586105298cda00a697d2efade
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414902
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Just the class/files. variable names and additional comments to follow.
Change-Id: Ic03d07fd5009eaf3d706c2536486a117328963fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342617
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@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>
External clients will need access to these classes once GrContext
goes away.
This is a purely mechanical CL.
Bug: skia:10441
Change-Id: I7ffeb29d88bcc0f012412fba911e8362d046e24a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300206
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
External clients will eventually have to call this to get access
to a direct context from an SkCanvas or SkSurface (which will
only have 'recordingContext' accessors).
Bug: skia:10441
Change-Id: I10e34081277b685fa59d03e1fce1887f3524e0fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300178
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Most of this CL is just noise (i.e., all the header changes) due to the
signature change. The 'discard' GM has some substantive changes but
that's about it.
Change-Id: I72011a442c149b5db93cf8decade6779be4f63d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296704
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
It appears that the Mac glyph rasterizer doesn't work well with our
AA-based SDF generator -- the SDFs produced have more aliasing than
expected. This CL changes the Mac to use 256 as its highest SDF size,
and only scale down from there.
More work may need to be done -- the best solution may be to generate
the SDFs directly from the path rather than the rasterized glyph.
Bug: 1003270
Change-Id: I7f11620a5628b6c1095b02d588d5026bf5a924e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254636
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@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>
Since this is a GpuGM we're guaranteed to have a GrContext
Change-Id: Ibab90a8734ebf36ed2bcae534e67e13894a18420
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197766
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
SkCanvas::flush is problematic and we wish to deprecate it. As a first step, this CL begins to remove Skia's internal usage of it.
Ideally clients would use SkSurface::flush and/or GrContext::flush.
Change-Id: I39bb0702f8230134a97961a4ee70833fd5bd0dcc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/196641
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This is useful, for example, when trying to test a hardware feature
that isn't supported in the current context.
Bug: skia:8731
Change-Id: I9a363159300c92e4039bfd05400238c27002efb1
Reviewed-on: https://skia-review.googlesource.com/c/189133
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This is a reland of f5efa78902
Original change's description:
> Add a GpuGM class for GPU-only tests
>
> Bug: skia:8731
> Change-Id: Ic81f21621c0183bb356601eb663fa1ee334bca55
> Reviewed-on: https://skia-review.googlesource.com/c/189134
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
TBR=mtklein@google.com
Bug: skia:8731
Change-Id: Ia322d7e9280b67ebea1edbefc820cae72cd9c3a6
Reviewed-on: https://skia-review.googlesource.com/c/190148
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Centralize these for my sanity. Most will also be parceled out to other contexts.
Change-Id: If0e7e98bcf66c4d8a3391f9b04e643ccc91af4ad
Reviewed-on: https://skia-review.googlesource.com/c/189488
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:8731
Change-Id: Ic81f21621c0183bb356601eb663fa1ee334bca55
Reviewed-on: https://skia-review.googlesource.com/c/189134
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Mechanical. This makes the priv() accessor the same for all the context types.
Change-Id: I40850eb05a33b8d7cc3eabdd42226d24b2ba58aa
Reviewed-on: https://skia-review.googlesource.com/c/189164
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
There was an issue on Android where a client was drawing a small bit of text,
and then a large chunk of text below it. On the next frame they started fading
out the text and then swapped out all of the large chunk of text. We were not
marking the Plot containing the small bit of text as still in use in this case,
so it was getting overwritten by later uploads. That bug has been fixed,
but this GM tests that codepath.
Bug: b/118850208
Change-Id: I81b795d6b0ee5d5d0b8e380823a568a52118ed0c
Reviewed-on: https://skia-review.googlesource.com/c/178924
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>