Always call generateMetrics before generatePath so that generateMetrics
can determine which glyph representation to use and if that glyph
representation can be modeled as a path.
Pass an allocator into generateMetrics so that it can set the path to
not existing. This allows generatePath to continue to work as it used
to, creating a path if any path is available. However, generateMetrics
may first set the path to not existing.
Update getPath and internalGetPath to use the path on the glyph if it
has already been set. Update makeGlyph and internalMakeGlyph to always
call generateMetrics first (which is now more like initGlyph).
Update the SkGlyph::PathData to indicate that it is a dev-path and not a
user-path. A user-path will have effects applied to it. A dev-path is
always a resolved path which is always filled -- unless it is hairline.
Update everything else for the knock on effects and to take advantage of
this information.
Bug: chromium:1266022
Change-Id: Id3f3cf5a534ab99f3a5779c910c1d1e191e68b1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/478658
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This prevents google.visualization.TreeView errors I encountered while visualizing the output of bloaty against a debug build of dm.
This CL also changes the unique symbol naming scheme to use number suffixes for more human-friendly symbol names.
These changes will be reflected in the Golang port of bloaty_treemap.py (see https://skia-review.googlesource.com/c/buildbot/+/478216).
Bug: skia:12151
Change-Id: I798a8556cab4ecbcc22d960733b88eac990aa78e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/478636
Commit-Queue: Leandro Lovisolo <lovisolo@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Leandro Lovisolo <lovisolo@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
To make the atomic rules a bit easier to work with, in many
of the folders, this adds in cc_library rules to group
together the sources from that folder (and subfolders
where prudent). We only needs sources because those atoms
should have their headers as deps.
One issue that was pointed out is that there is currently
no way to restrict the inclusion of certain packages,
a la, `gn check`. For example, there is no mechanism from
stopping a dev from adding
#include "modules/canvaskit/WasmCommon.h"
to something in //src/core (except circular dependencies).
We can probably address that using Bazel's visibility
rules as needed:
https://docs.bazel.build/versions/main/visibility.htmlhttps://docs.bazel.build/versions/main/be/functions.html#package_group
It is recommended to look at this CL patchset by patchset.
PS1: Update gazelle command to generate rules in more folders.
PS2: A few changes to make generation work better.
PS3: The result of running make generate in //bazel
PS4: Adding the rules to build sksllex, the simplest binary I
could find in the Skia repo.
PS5: Adding the rules to build skdiff, a more complex binary.
I tried a few approaches, but ended up gravitating back
towards the layout where we have each folder/package
group up the sources. I imagine at some point, we'll have
skdiff depend on skia_core or something, which will
have things like //src/core, //src/codecs, //src/pathops
all bundled together.
PS7: Added in the groupings of sources, similar to what we had
earlier. I liked these for readability. These helped fix
up the //:skia_core build, and by extension, the CanvasKit
build.
Change-Id: I3faa7c4e821c876b243617aacf0246efa524cbde
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/476219
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Having all includes to skia source will make generating
BAZEL rules easier.
Change-Id: I318dfc88e736a62da151098bebbee8d7b357d963
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474736
Reviewed-by: Ben Wagner <bungeman@google.com>
Bug: skia:12524
Change-Id: Iac60a99331fefe9e997b61c4b2b329e39b95ae6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/470197
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Bug: skia:12662
Change-Id: Ic18220668a4f87e7340a53b3f191887a7a016a04
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/473141
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This re-works src/ports/BUILD.bazel to work like our other
BUILD files, i.e. one rule "srcs" that brings in the necessary
private filegroups.
To work around an abort with LLVM [1], we have to go back to an
earlier version of emscripten (temporarily?).
Future work should look at using transitions [2] to allow various
executables (e.g. CanvasKit, DM) to set their own set of Bazel
flags, w/o the build invokers having to specify them.
These transitions might be able to handle more complex cases
that we currently use if statements in GN to deal with.
The Freetype build rule was created by taking the BUILD.gn
rule, adding in all the sources listed there and then playing
compile-whack-a-mole to add in all the headers and included
.c files.
Suggested Review Order:
- third_party/BUILD.bazel to see freetype build rules
- bazel/common_config_settings/ to see treatment of fontmgr
like codecs (many possible) and fontmgr_factory (only one).
- src/ports/BUILD.bazel
- BUILD.bazel
- modules/canvaskit/BUILD.bazel. Take note of the gen_rule that
calls tools/embed_resources.py to produce the .cpp file
containing the embedded font data.
- Everything else.
[1] https://github.com/emscripten-core/emscripten/issues/15528
[2] https://github.com/bazelbuild/examples/tree/main/rules/starlark_configurations/cc_binary_selectable_copts
Bug: skia:12541
Change-Id: I08dab82a901d80507007b354ca20cbfad2c2388f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/471636
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Instead of seeing something not super helpful like:
/home/kjlubick/skia/skia/third_pa... @ 169895d529dfce00390a20e69c2f516066fe7a3b
With this change, that becomes:
...rd_party/externals/d3d12allocator @ 169895d529dfce00390a20e69c2f516066fe7a3b
Change-Id: Ie5483a5540f408719f797efdcb50d24b97b568fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/471456
Reviewed-by: Ben Wagner <bungeman@google.com>
Replaced by Graphite.
Change-Id: Iac0ba212b078904a591677c9ce839a90562d0240
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/470305
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: Ibeea56ebd5dce53af1252ca3ecf6cc6f010bd461
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/469902
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This cycles the primaries, just like SkColorSpace::makeColorSpin.
Helpful for debugging more exotic color space issues.
Change-Id: I3434c7a9f24642f13be0ac3513599a15247d1f6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/469360
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
These rules can be used to build our GMs on WASM+WebGL and
libskia.a with just the CPU backend (and most other features
turned off).
This can be done with the following commands:
- bazel build //modules/canvaskit:gm-bindings-wasm --gpu_backend=gl_backend --with_gl_standard=webgl_standard
- bazel build :skia-core --config clang
This pivots slightly from http://review.skia.org/463517
by using config_settings [1] instead of platforms for
the optional features that we control. This pivot was
suggested in [2]
We have BUILD.bazel files in many of the subdirectories
that specify filegroups for the appropriate files. In
an effort to make //BUILD.bazel more readable, it is
the responsibility of these subfolders to deal with
conditionally including certain .h or .cpp files.
This is done using select statements and config_settings
or platform constraints as necessary.
For example, src/gpu/BUILD.bazel will different private
filegroups for each of the supported gpu backends [3]
and a more-visible filegroup called "srcs" that has
the right selection of the private files to be used
for compilation.
An effort has been made to avoid using glob() in our
BUILD.bazel files. These file lists were made by using
`ls -1` and some regex to add in quotes. We might want
to make a helper script to assist with that, if necessary.
To specify which options we have, the settings in
//bazel/common_config_settings/BUILD.bazel have been
redesigned. They make use of a macro `string_flag_with_values`
that removes the boilerplate. Patchset 36 shows what the
file looks like w/o the macro.
The top level BUILD.bazel file will still need to use
some logic to handle defines, because local_defines is
a list of strings, not a list of labels [4].
Suggested Review Order:
- WORKSPACE.bazel to see the new dependencies on the
emsdk toolchain and bazel_skylib
- bazel/common_config_settings/* to see the few settings
defined (we have more to define, see BUILD.gn and
//gn/skia.gni for ideas)
- BUILD.bazel to see the "skia-core" cc_library rule.
See also "gms" and "tests"
- modules/canvaskit/BUILD.bazel to see the use of
the emscripten "wasm_cc_binary" rule, which depends
on the "skia-core", "gms", and "tests" rule. Note that
it only builds some of the gms as a proof of concept.
- The other BUILD.bazel files. Some of these are not
platform or feature dependent (e.g. pathops). Others
are (e.g. gpu).
- All other files.
[1] https://docs.bazel.build/versions/4.2.1/skylark/config.html#user-defined-build-settings
[2] https://github.com/emscripten-core/emsdk/pull/920
[3] In this CL, that's just the webgl one.
[4] https://docs.bazel.build/versions/main/be/c-cpp.html#cc_library.local_defines
Change-Id: Ieecf9c106d5e3a6ae97d13d66be06b4b3c207089
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458637
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Owners-Override: Kevin Lubick <kjlubick@google.com>
We define this to be 1 or 0, so #ifdef is not what
was intended.
Change-Id: I0182718980c39dced98bf90255703a6f080f9cac
Bug: skia:12584
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/468956
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Change-Id: Ic110ea129cf902d8d1a87c6133e71a1fdeb366f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/468376
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Use SkVMBlitter::DebugName for the string. This is easier to read, and
has some actually useful information about the blitter.
Added magenta highlight of the hovered element, similar to the GPU.
Change-Id: Ic9b5a0f61e092c8aa555f375d5d2f2de22cc45fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467977
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Caveats:
- You want to run viewer with `--skvm` to see much/anything
- The cache is LRU, and doesn't get flushed automatically. Hitting
'Clear' will flush it, so it will pick up only the blitters used
on the current slide. (Otherwise they accumulate as you navigate).
- No way to determine which blitter is for which primitive, yet.
I'd like to do the GPU-style magenta highlight, but that may be
tricky, because we need to preserve the semantics of the original
blitter (including destination color type, most importantly).
Change-Id: I2df763fdb697d87471ca0816a3b7087ffb4fc4e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467783
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Add a getter to SkTypeface to provide information on whether it
needs access to the foreground color (in COLR fonts) so that the
strike cache can determine caching requirements.
Since remote SkTypefaces do not have access to table information,
implement this as a serializable flag, with font-blob backed
implementations being able to return this based on whether they
have a COLR table or not, starting with FreeType.
Preparation for supporting foreground color in FreeType COLR
rasterisation.
Bug: skia:12576
Change-Id: I7e71b0ec12e17f652ab7b43adffc43bc780ce2e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466936
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Also fix some missing includes in:
- src/gpu/effects/GrPorterDuffXferProcessor.cpp
- src/gpu/GrDirectContext.cpp
- tools/DDLPromiseImageHelper.h
Change-Id: I1b30827e1442fd01534427b52549f8775300b365
Bug: skia:12584
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466876
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
This reverts commit 65a726bb49.
Reason for revert: You cannot include a src file in an include file. This ends up using c++17 features in our includes. Breaks rolls.
Original change's description:
> Move GR_MAKE_BITFIELD_OPS and GrAlignTo to non-GPU files
>
> These have been renamed SK_MAKE_BITFIELD_OPS and SkAlignTo
> because nothing seemed particularly GPU/Ganesh specific to them.
>
> I moved the latter to SkTypes.h because we have other align
> code there and former to src/SkUtils.h because I didn't know
> where else it should go.
>
> The primary motivation was removing the GrTypesPriv.h
> include from src/core/SkBlockAllocator.h. I had attempted
> some amount of #if SK_SUPPORT_GPU, but that's not as clean
> here because both our CPU and GPU backends use the
> SkBlockAllocator (as far as I could tell).
>
> This also moves sk_memset* from SkUtils.h to SkOpts.h, because
> SkOpts.h requires bringing in RasterPipeline, which seemed
> like overkill.
>
> Change-Id: I5163ef5064ad3840a15b7e873930d60e2620bf9d
> Bug: skia:12584
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/464876
> Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:12584
Change-Id: I1b772bbbc6f150d737bb53fa4e5f45d1581929fa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/465376
Auto-Submit: Greg Daniel <egdaniel@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
These have been renamed SK_MAKE_BITFIELD_OPS and SkAlignTo
because nothing seemed particularly GPU/Ganesh specific to them.
I moved the latter to SkTypes.h because we have other align
code there and former to src/SkUtils.h because I didn't know
where else it should go.
The primary motivation was removing the GrTypesPriv.h
include from src/core/SkBlockAllocator.h. I had attempted
some amount of #if SK_SUPPORT_GPU, but that's not as clean
here because both our CPU and GPU backends use the
SkBlockAllocator (as far as I could tell).
This also moves sk_memset* from SkUtils.h to SkOpts.h, because
SkOpts.h requires bringing in RasterPipeline, which seemed
like overkill.
Change-Id: I5163ef5064ad3840a15b7e873930d60e2620bf9d
Bug: skia:12584
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/464876
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:12466
Change-Id: If633ce39c8f45b1ee3c042b5b72d7e0f95ca5c19
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459597
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This also adds a base class BufferWriter which Vertex, Index, and
Uniform Writers inherit from
Bug: skia:12466
Change-Id: Icbac1210fbbd07321f9d88728ddde1e761fe4bb0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/463496
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
This class can now be shared with Graphite.
Bug: skia:12524
Change-Id: I7841410b3e8e111a12298efe0a1898a33295873a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/462556
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This can successfully build a C library:
bazel build --config=clang //third_party:libpng
This can build and run a statically-linked executable:
bazel test --config=clang //:bazel_test
For more verbose compile and linking output, add the
`--features diagnostic`
flag to a Bazel command (see _make_diagnostic_flags() in
toolchain/clang_toolchain_config.bzl. Similarly, a
`--features print_search_dirs` can be used to show where
clang is looking for libraries etc to link against.
These features are made available for easier debugging.
Suggested review order:
- Read https://docs.bazel.build/versions/4.2.1/tutorial/cc-toolchain-config.html
if unfamiliar with setting up C++ toolchains in Bazel
- .bazelrc and WORKSPACE.bazel that configure use and download
of the toolchain (Clang 13, musl 1.2.2)
- toolchain/build_toolchain.bzl which downloads and assembles
the toolchain (w/o installing anything on the host machine)
- toolchain/BUILD.bazel and toolchain/*trampoline.sh to see
the setup of the toolchain rules.
- toolchain/clang_toolchain_config.bzl to see the configuration
of the toolchain. Pay special attention to the various
command line flags that are set.
- See that tools/bazel_test.cc has made a new home in
experimental/bazel_test/bazel_test.cpp, with a companion
BUILD.bazel. Note the addition of some function calls
that test use of the C++ standard library.
The number being used to test the PNG library is the latest
and greatest that verifies we are compiling the one brought
in via DEPS (and not a local one).
- third_party/* to see how png (and its dependent zlib) have
been built. Pay special attention to the musl_compat hack
to fix static linking (any idea what the real cause is?)
- //BUILD.bazel to see definition of the bazel_test executable.
Change-Id: I7b0922d0d45cb9be8df2fd5fa5a1f48492654d5f
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/461178
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
In places where we use GR_METAL_SDK_VERSION to determine the contents of
a class, it's important to consistently #include the header which sets
the value of GR_METAL_SDK_VERSION.
Change-Id: Ic4824ff36c982d3493ebec03dd38465bb90b287a
Bug: skia:12513
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/461836
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Makes the path sniffing code from BisectSlide reusable.
Change-Id: I21c1e752590359c557c35804e5d5044d8041a308
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/460637
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: b/197774543
Change-Id: Ic441387a5a48a4bea7eb508cf53e7f88851ec5f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453316
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This consolidates tools/flags/CommonFlagsFontMgr.h into
tools/flags/CommonFlags.h and adds all those common
flags into the CommonFlags namespace.
I also cleaned up a few unused includes in DM.cpp
Change-Id: I1d1bf6598dfb87619b6abbb9faa1e24631f76fb4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459476
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Also noticed while trying to build GMs in WASM with
Bazel.
Change-Id: I33d467a0da0893c1a5e376f4fd1a6096dad48af3
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459198
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
The ToolUtils file is getting a bit bloated, IMO. I noticed this when
working on Bazel includes.
Including non-header files is a small nuisance in Bazel, so it
is probably better to just make it its own compilation unit.
Change-Id: I06ca3808a37ebef6478f5afa3f14086429899590
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459197
Reviewed-by: Ben Wagner <bungeman@google.com>
Bug: skia:12466
Change-Id: Icbd4fd6098c8a50164613e630db476bf8ea41517
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/459177
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Change-Id: Ie853618fb496a77ffb79d6669f87048260df68b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458979
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
With this CL we can run as:
dm --src gm skp tests --config grmtl -v --nocpu --nogpu
and not get all the non-Graphite unit tests.
Bug: skia:12466
Change-Id: Ib3f04f315fe4b5731a54e4c72979a0c1e00baf24
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457898
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Classes of issues addressed:
1. static constexpr class variables aren't automatically inline. Already handled in a separate CL
2. Lack of C++17 copy elision means classes of objects constructed at function return need a copy or move constructor even if RVO will mean it isn't called.
3. Nested braced init no longer allowed for base classes of subclasses without constructors.
4. template static constexpr var in template class throws error about redundant initialization. Adding inline and removing defn outside of class fixes it.
5. Some places that should have been including std headers now actually need to include them.
6. No auto template parameters.
7. No lambdas in constexpr funcs.
Bug: chromium:1257145
Change-Id: Icb24c6b4ed039287fb4cf27a21a1bb7dc9821728
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457298
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
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>
Bug: skia:12466
Change-Id: I401a185d818a964327d323b9ebcd0850ec0b1c9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457318
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Adds a type enum to WindowContext to determine which kind of
GPU context (GrDirectContext or skgpu::Context) we're using.
Bug: skia:12466
Change-Id: I288878740392a43cd9e82c925fbe2c372d140dc5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/454699
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:12466
Change-Id: I3299940af72cffde3904cf5f6262955807d6d1bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453637
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:12466
Change-Id: I90ebec9ee744de3822bd82d474858015d2490d72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453636
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This makes "dm --config grgl --src gm skp" generate a lot of green pngs and adds a stub class for Image_Graphite.
Bug: skia:12466
Change-Id: Ia7cf891ad278434f473cf6c9c4673bf8fa085adf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/451740
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This is a reland of 6aac1193a7
Original change's description:
> Add new GrSurfaceInfo class and related backend structs.
>
> Bug: skia:12402
> Change-Id: I45b2f71dcfa5843e2a19a8de7d34196a4d552905
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445176
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: skia:12402
Change-Id: Id540bea408d72ceba43ec4245c3748d630121926
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/450277
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This reverts commit 6aac1193a7.
Reason for revert: Breaking Mac bots in Chromium roll. Looks like
they depend on getVkImageInfo for an unknown reason, and it's
hidden behind SK_VULKAN.
Original change's description:
> Add new GrSurfaceInfo class and related backend structs.
>
> Bug: skia:12402
> Change-Id: I45b2f71dcfa5843e2a19a8de7d34196a4d552905
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445176
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: skia:12402
Change-Id: I3c9642354dae8c955bc58d281700536393f84519
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/450199
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: If3e838f22f1b99fd7a3b1c6bca0affd39f5573b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449843
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
`removeprefix` was only added to Python in March 2020. It isn't
available on Python 3.8.2, which is the default macOS Python installed
version.
https://www.python.org/dev/peps/pep-0616/
Change-Id: I7b8db0dfc55f1448cc72f41ba9a6ad5f099d48ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448259
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
We need to ensure all async reads are completed before we finish
encoding -- otherwise late reads will fire from the GrContext destructor
and crash because the encoder is no longer valid.
Change-Id: I0065561d2411ddd202897e625a187592e40ced87
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/447184
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Unblocks angle roller into skia that was triggering an assert in
EGLImageTest. In that test, there were two egl contexts created that
shared the same egl display. The child context was destroyed first,
and ANGLEGLContext's destroyGLContext() implementation always called
eglTerminate on the display. According to the egl spec you're not
supposed to do anything with the terminated display other than call
makeCurrent() to release any active context.
In this case, the child context's termination would cause the display
to be deferred until the parent context was destroyed. This triggered
a bug in ANGLE's D3D backend, leading to the assert. However, with
that fixed, we then trigger critical error messages about calling
eglDestroySurface, etc. in the parent context's destroyGLContext()
function since the display was terminated out from beneath it.
This change adds a rudimentary ownership tracking mechanism to the
ANGLEGLContext so that when a child context is cleaned up it won't
call eglTerminate on its display. This happens to avoid the bug in
ANGLE's D3D backend as well as silencing the critical warnings if it
were fixed.
Bug: skia:12413
Change-Id: I31f64189315a1921adbee204d11138272d4b40af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/446182
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Also update RELEASE_NOTES to describe new syntax.
Change-Id: I2666551b98f80b61ae3a48c92a9e306cdc7242b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444735
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Bug: skia:11837
Change-Id: I3dde13940e57763d5a8224cb1a4b555e904351d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442716
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:11837
Change-Id: Ie99b1c512885404351d6917bbea751d99a2ca23e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442797
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:8451 skia:10827
Change-Id: I5b38a1d72cd4558f8e2a92aaf9b12f05efce0923
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442683
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
We'll switch to the correct context when necessary (e.g. before
calls that talk to the GPU). This is achieved by adding in
calls at the JS layer to switch the context before making a call
that is known to talk to the GPU (e.g. draw calls on SkCanvas).
Another implementation that was considered was to add a C++
shim in GrGLInterface that would switch the context before
every call in the GPU - however, that seemed too difficult
and would add extra overhead if a single draw* call talks
to the GPU multiple times.
Bug: skia:12255
Change-Id: I96e4c6b41a5bfcc9913aeaca7ccb125358048ad3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432136
Reviewed-by: Brian Salomon <bsalomon@google.com>
Support is added so we can differentiate between using discardable
msaa for normal msaa draws and using it for DMSAA. Before this
many asserts and checks throughout GrVk* assumed we could only have
discardable msaa if the actual render target was msaa.
After this change the only thing missing to enable DMSAA on Vulkan
is to fix GrProgramInfo to store the actual sample count the program
will use instead of the same count of the GrRenderTarget.
Change-Id: Ifdb9a3beb641f96f6dfebe3241ccc5a2c8770bb3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441517
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Bug: skia:12302
Change-Id: I8cf958acf9214d0de903a4097647afd74f2a659e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441541
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This is a reland of 0f7c10ef56
Original change's description:
> Add sRGB 8888 colortype
>
> A color type that linearizes just after loading, and re-encodes to sRGB
> just before storing, mimicking the GPU formats that work the same way.
>
> Notes:
> - No mipmap support
> - No SkPngEncoder support (HashAndEncode's .pngs are ok, though?)
> - Needs better testing
>
> This is a re-creation of reviews.skia.org/392990
>
> Change-Id: I4739c2280211e7176aae98ba0a8476a7fe5efa72
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438219
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
Change-Id: I5b6bb28c4c1faa6c97fcad7552d12c331535714d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441402
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 0f7c10ef56.
Reason for revert: Unhappy rollers
Original change's description:
> Add sRGB 8888 colortype
>
> A color type that linearizes just after loading, and re-encodes to sRGB
> just before storing, mimicking the GPU formats that work the same way.
>
> Notes:
> - No mipmap support
> - No SkPngEncoder support (HashAndEncode's .pngs are ok, though?)
> - Needs better testing
>
> This is a re-creation of reviews.skia.org/392990
>
> Change-Id: I4739c2280211e7176aae98ba0a8476a7fe5efa72
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438219
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reed@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
Change-Id: Ie199535b9b65ec7c7fef3c773452ea06bdbd2d9c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441376
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
A color type that linearizes just after loading, and re-encodes to sRGB
just before storing, mimicking the GPU formats that work the same way.
Notes:
- No mipmap support
- No SkPngEncoder support (HashAndEncode's .pngs are ok, though?)
- Needs better testing
This is a re-creation of reviews.skia.org/392990
Change-Id: I4739c2280211e7176aae98ba0a8476a7fe5efa72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438219
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This CL just moves the files and renames them. It doesn't move them into the skgpu::v1 namespace.
Bug: skia:11837
Change-Id: Iab322d0dc5b5d1cfd32436785081539dc85c18d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440776
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Having this enum on GrTessellationPathRenderer forced it to be over-#included and was blocking making GrTessellationPathRenderer.h v1-only.
Bug: skia:11837
Change-Id: I80660ed659946d7aa555057c9f4fd1136b44cca0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440536
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This centralizes the new color-space parsing into SkCommandLineConfig,
and then wires that up in DM, nanobench, and skpbench. It also removes
all of the old config names that encoded both color type and space.
Change-Id: I9a63a97f1d153e7636a1fb974cc4071f5ada3184
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438377
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This is patterned after http://review.skia.org/439776, but uses the
`six` library for Python 2/3 cross-compatibility.
Change-Id: If64c48c35d86b83c77316bb5536be6e7bd24c967
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439936
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This reverts commit bd40fb55bb.
Reason for revert: I give up.
Original change's description:
> Update rewrite_includes.py for python3
>
> Change-Id: Ib1b6f8c17554f8121bd2351b5b214e1b2a79f758
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439776
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=kjlubick@google.com,brianosman@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
Change-Id: I6be08249f805cce00d35e28e457fe5628b447629
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439940
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: Ib1b6f8c17554f8121bd2351b5b214e1b2a79f758
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439776
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
These changes will allow us to enable shadowed-variable warnings.
Change-Id: I24ee7e198c1c77b58836237c37557c00452680e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439476
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This reverts commit d90777ada3.
Reason for revert: relanding with fix to GrBackendTexture
Original change's description:
> Revert "Remove GrBackendFormat's textureType use from isFormatTexturable call."
>
> This reverts commit 832c817bc8.
>
> Reason for revert: uninitialized value in GrBackendTexture
>
> Original change's description:
> > Remove GrBackendFormat's textureType use from isFormatTexturable call.
> >
> > The goal of this change was to remove the use of GrBackendFormat::textureType()
> > from GrCaps::isFormatTexturable call. Instead we will always pass in a
> > GrTextureType into this call.
> >
> > To do this a lot of plumbing of GrTextureType was added to various call
> > sites. However, this CL halts the plubming up at the proxy level where we
> > get it from the GrBackendFormat still. Future CLs will continue removing
> > these call sites and others that use GrBackendFormat::textureType().
> >
> > Bug: skia:12342
> > Change-Id: Ic0f02b9c7f7402405623b8aa31aa32a9a7c22297
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439277
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
>
> Change-Id: I354bbbf00be7a86c480009f3e7b36a8777a6bf3a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:12342
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439338
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
# Not skipping CQ checks because this is a reland.
Bug: skia:12342
Change-Id: I151196f149f9e191d2975b8fe81334f4f8720744
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439339
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
I will follow up with a CL actually moving the newly V1-only files to their final homes and adding namespaces.
Bug: skia:11837
Change-Id: I0fed1a802ae93a4357c53cde2b665ad6ddb49a6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418996
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 832c817bc8.
Reason for revert: uninitialized value in GrBackendTexture
Original change's description:
> Remove GrBackendFormat's textureType use from isFormatTexturable call.
>
> The goal of this change was to remove the use of GrBackendFormat::textureType()
> from GrCaps::isFormatTexturable call. Instead we will always pass in a
> GrTextureType into this call.
>
> To do this a lot of plumbing of GrTextureType was added to various call
> sites. However, this CL halts the plubming up at the proxy level where we
> get it from the GrBackendFormat still. Future CLs will continue removing
> these call sites and others that use GrBackendFormat::textureType().
>
> Bug: skia:12342
> Change-Id: Ic0f02b9c7f7402405623b8aa31aa32a9a7c22297
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439277
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
Change-Id: I354bbbf00be7a86c480009f3e7b36a8777a6bf3a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439338
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
The goal of this change was to remove the use of GrBackendFormat::textureType()
from GrCaps::isFormatTexturable call. Instead we will always pass in a
GrTextureType into this call.
To do this a lot of plumbing of GrTextureType was added to various call
sites. However, this CL halts the plubming up at the proxy level where we
get it from the GrBackendFormat still. Future CLs will continue removing
these call sites and others that use GrBackendFormat::textureType().
Bug: skia:12342
Change-Id: Ic0f02b9c7f7402405623b8aa31aa32a9a7c22297
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439277
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Basically, ensure all the headers about to become V1-only only appear in contexts that are currently or will soon be V1-only.
This is almost all fallout from retracting some of the moving headers from other headers i.e.:
GrMeshDrawOp.h from GrOpFlushState.h
GrDrawOp.h from GrOpsRenderPass.h
GrDrawOp.h from GrOpsTask.h
GrSimpleMeshDrawOpHelper.h from GrTessellationShader.h
Bug: skia:11837
Change-Id: I939f5c82c3042e9ab00571b5796ab82dbe968085
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438677
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is needed so we can support VK_EXT_image_drm_format_modifier. These
headers are just used internally in Skia so this should have no effect
on anyone using Skia.
Bug: skia:12336
Change-Id: I502f8e7dbbeb8e48ff03fb7ef0e5db3e8bcbb40d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438737
Reviewed-by: Brian Salomon <bsalomon@google.com>
Move ProgramImpl function definitions into Processor subclass cpp files.
Delete separate h/cpp files.
Modify GrGLSLVaryingHandler::addPassThroughAttribute to break #include
cycle. It now takes a ShaderVar rather than a GP::Attribute, making
it slightly more flexible as the input can be any variable defined
in the vertex shader.
Bug: skia:11358
Change-Id: I94ee8cd44d29e194216592ecae5fd28de785c975
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438596
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Named "Impl" and nested in GP or makeProgramImpl definition.
Remove unused INHERITED typedefs.
Remove GenKey pattern.
Bug: skia:11358
Change-Id: Icb4d5a0844184f51d92135de6cee6f6e77f57a5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438478
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
If we manage to fix all the existing cases of variable shadowing, we
could enable -Wshadow.
(Turtle.cpp is #included from a cpp in the tools directory.)
Change-Id: I1685086ec0ceae1d51efa7daa0f46137b535ce77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438476
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
The skdiff code leaks some file names. Instead of augmenting the
existing manual ownership, give everything an owner.
Change-Id: I8bc2cb39ad4176bb3be645710ae28271f5b12ff9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437000
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Almost entirely mechanical.
Bug: skia:11837
Change-Id: I984339097fdeeae2eccb6c1d790d510020511961
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438177
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is necessary cleanup before changing the type of the matrix and
clip stack. That work has landed and reverted several times, so landing
this piece separately, first.
Change-Id: I147e4cc4260fa5e07a0712503f879da120f8466a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435278
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
return from GrGP by unique_ptr, rename factory function to
makeProgramImpl()
Bug: skia:11358
Change-Id: I61dd36f770d2fc0b54de0e0e7b78ac4d3fbd119a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437741
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
I noticed Viewer lagging significantly when interacting with certain
sliders (such as transform state). It turns out that the UI tracking
would trigger calling Window::setRequestedDisplayParams and that in
turn can trigger a full context recreation, depending on backend.
I'd recently changed GPUs in my machine and apparently its context
creation is substantially slower than my previous one. Historically
I noticed minor jank when interacting, but it was never a deal
breaker.
This splits the parameter tracking into two categories so that lighter
weight widgets can still trigger window invalidation / re-rendering,
without triggering the context creation.
Change-Id: I3eb4c15b802f8b8ea8d8eca386de5dcee22ba9ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437685
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Bug: skia:11358
Change-Id: Ie70e45b18c12126c8e86700ad1040bc319be385a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436998
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:10209
Change-Id: I72639b7e768742dcdec810a5a714ce21ff0f6e0a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436565
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Change-Id: I0e093fd35b11e9a765ef9c09f3b6346086ff66bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435983
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Fix a number of warnings as errors about unused private methods when
skia_use_gl is set to false and SK_GL is not set.
Change-Id: Idcc08a1434ec11a6ce9c8df034c9fa472bf08d08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436822
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
The SkClipOpPriv.h header will be going away soon, but a number of
places still use its kIntersect_SkClipOp definitions instead of the
equivalent SkClipOp::kIntersect. Besides updating these references,
a number of unnecessary includes to SkClipOpPriv.h are removed and
some test cases exercising expanding clip ops are deleted since they
will be unnecessary shortly.
Bug: skia:10208
Change-Id: I2bbdd6bb39869134c6a80ef2b4482e6cabdeb0b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436157
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Bug: skia:11837
Change-Id: I60112e370c95e6f9d9bc12cb9b05d40dd2220bc9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435279
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
In the new GrSurfaceContext class hierarchy we can get either a v1 or v2 SFC/SDC depending on the context options setting.
Bug: skia:11837
Change-Id: Ia25bc10b58bbbaf65a484b323d9d0eee471bb7ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435276
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Now that we support sampling from an SkBlender inside a Runtime Effect,
we can leverage that to reuse the blends from SkBlender::Mode. This lets
us avoid hard-coding copies of every built-in blend function.
Change-Id: I51f380490611fbde943c16648999b4fd4e6a14a9
Bug: skia:12257, skia:12085
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/434472
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit cc9d20f308.
Reason for revert: Wrong API pre-C++17
Original change's description:
> SkCanvas: switch from SkDeque to std::deque
>
> Bug: skia:10987
> Change-Id: If252f644dc3b8827356f9c7044c8e01fd0fc5afe
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/434676
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,reed@google.com,michaelludwig@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
Change-Id: Ica125d5ad04332d68f54dd544373fa29eaf2b69c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10987
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/434856
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:10987
Change-Id: If252f644dc3b8827356f9c7044c8e01fd0fc5afe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/434676
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@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>
Since:
https://skia-review.googlesource.com/c/skia/+/431539 (Feed all top-level GPU accessors through skgpu::BaseDevice (take 2))
The OveridePaintFilterCanvas now blocks access to the true SurfaceDrawContext that backs the top device of a GPU-backed SkCanvas. This is because the SkPaintFilterCanvas doesn't pass on SkCanvas::topDevice calls to the canvas it is wrapping so it always returns a SkNoPixelsDevice.
Given that accessing the top SDC is an incredibly specialized testing-only feature this CL keeps the feature working short-term w/o gumming up the public API.
Change-Id: I99012ba34c2800e0149251667156b412c4e8aa63
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433362
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Creates a new path renderer, GrAtlasPathRenderer, that handles all the
atlasing. Managing the atlas in its own path renderer gives us more
control over when atlasing happens in the chain, will allow us to more
easily use the atlas in kCoverage mode, and makes the clipping code
cleaner.
Bug: skia:12258
Change-Id: Ie0b669974936c23895c8ab794e2d97206ed140f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431896
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
AndroidFramework uses both their own custom display list (which could
handle resetClip with android-side changes) AND conventional picture
recording. In order for replace op emulation to work when they have
been recorded into a picture, we need to make it virtual and supported
in SkPicture.
This also renames the API to ResetClip() from ReplaceClip() and does not
have any additional arguments. Based on AF's usage pattern, it only n
needs to reset the clip to the surface bounds or the device clip
restriction, it seems best to reduce the API as much as possible before
it's adopted.
Bug: skia:10209
Change-Id: I37adb097c84a642f4254b8c0f9d4c7fea8d9abdf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430897
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This is a reland of 202ce887ec
Original change's description:
> Prefer the NV_framebuffer_blit extension over ANGLE
>
> The ANGLE/CHROMIUM glBlitFramebuffer requires full size blits, which
> is really bad for DMSAA. The NV extension does allow blits of
> sub-rectangles, so we prefer that one if it's available.
>
> Bug: skia:12176
> Bug: skia:12177
> Bug: skia:12234
> Bug: skia:12235
> Change-Id: I463ac631fff64ad564f294cf2f26be7410e8c356
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430576
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: skia:12176
Bug: skia:12177
Bug: skia:12234
Bug: skia:12235
Change-Id: I41d062f9894f5a81c78a37de27a288bc17812643
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431817
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This reverts commit 202ce887ec.
Reason for revert: Need to update Chrome first to give us the NV one.
Original change's description:
> Prefer the NV_framebuffer_blit extension over ANGLE
>
> The ANGLE/CHROMIUM glBlitFramebuffer requires full size blits, which
> is really bad for DMSAA. The NV extension does allow blits of
> sub-rectangles, so we prefer that one if it's available.
>
> Bug: skia:12176
> Bug: skia:12177
> Bug: skia:12234
> Bug: skia:12235
> Change-Id: I463ac631fff64ad564f294cf2f26be7410e8c356
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430576
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:12176
Bug: skia:12177
Bug: skia:12234
Bug: skia:12235
Change-Id: Iaa9f82e1c0c935a67dd8f446d1513b2b0a98f725
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430819
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
The ANGLE/CHROMIUM glBlitFramebuffer requires full size blits, which
is really bad for DMSAA. The NV extension does allow blits of
sub-rectangles, so we prefer that one if it's available.
Bug: skia:12176
Bug: skia:12177
Bug: skia:12234
Bug: skia:12235
Change-Id: I463ac631fff64ad564f294cf2f26be7410e8c356
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430576
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
All JS strings are now single-quoted, so double-quotes don't need
escaping. There are some symbols (in fullsymbols mode) that contain
single quotes, though - so escape those instead.
Change-Id: Ibdcca5634413c6a5e292f81503fbbf89f3d52b0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430040
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Pull a thread, and end up removing logs of old fontmgr code.
Change-Id: I73cebf9c011a99e9d12fd728e8677fcb0700407f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/429338
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Bug: chromium:1220246
Change-Id: I0e9db2e403455ccc5d75acc714aa8201db285afc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/429678
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
In a perfect world, this should always render the same, just perhaps a
bit more slowly.
Change-Id: I750ad43142d4d192be4db7396989d978025179a8
Bug: skia:12080
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/429101
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
There is so much more that could be done here (some ideas in TODO
comments), but this greatly streamlines the process for average
developers to navigate the code-size of skia executables.
Currently, I'm using a locally built copy of bloaty, but we should see
about using DEPS or adding a fetch-able package to eliminate even more
friction.
Change-Id: I92186c0370a1ab8d2c8edd73932547402c43612d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/428959
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This will help us write tests confirming that runtime blends work the
same as the built-in blends.
Change-Id: I2f94aa7bbbc7124d09b490fc7509a4c281025307
Bug: skia:12080
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/427618
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
onCreateProgramInfo needs to know if DMSAA will be rendering to a
separate MSAA target in order to properly set up its pipeline and
shaders. This CL mostly just plumbs this unformation through, but also
cleans up FillRRectOp now that this information is available.
Bug: skia:12201
Change-Id: I7300d2725da72484a12bd0c9d3ad298ae81bff90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/427577
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This CL has some rough edges since some classes that use it (e.g., GrOpsTask) aren't yet V1-only. That said, the big CL has to be broken up somehow.
Bug: skia:11837
Change-Id: I41ed9982ca4664f893e447ba23c7aec59f42c964
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/426416
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This CL:
finishes off some renaming I missed earlier
removes some extraneous #includes from headers
TBR=bsalomon@google.com
Bug: skia:11837
Change-Id: If7163435a44d4067dac041a7f9e68b1ad63432d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/426037
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Making GrDrawRandomOp and test_ops V1-only drags several GMs and tests with them. All the other GMs/tests explicitly require Ops.
Bug: skia:11837
Change-Id: I45c0a1054c3b1ec43f509595c6492581d10314cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425016
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: Id2061ebe7873aa8b9480a2d8b0133c2fb79e79bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/424098
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
... since it mysteriously returns something even if the blender doesn't
map to any enum. Clients should use asBlendMode() or getBlendMode_or().
Change-Id: I5dc5aea51f47f297ef9b2a89535d47ac58aea9bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425177
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
//tools/fiddle/make_all_examples_cpp.py had not run in a while, so
some of these fiddles were not being compiled regularly and bit-rotted.
A follow-up CL will try running that script as a presubmit.
Change-Id: Ib851cb5d70485e354de3388abf56666492335d46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423956
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit 0734c6223c.
Reason for revert: This was fixing the symptom and not the disease
Original change's description:
> Clear the tile backend textures when drawing DDLs
>
> It appears that the flutter SKPs don't contain an initial clear so the background can be random noise.
>
> This only appears to be an issue for the Metal backend.
>
> Change-Id: I4f5c823cdb1a0a76c0704d4d48355c3a0ed75d43
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423316
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
TBR=robertphillips@google.com,reed@google.com,michaelludwig@google.com
Change-Id: Iaa52a66248cef2896fc310ee199c3cef7029e532
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423581
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
It appears that the flutter SKPs don't contain an initial clear so the background can be random noise.
This only appears to be an issue for the Metal backend.
Change-Id: I4f5c823cdb1a0a76c0704d4d48355c3a0ed75d43
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423316
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Discovered while trying to run viewer in ASAN
Change-Id: Ic7469fdbf8cb77573c2f93503440b2137bdba783
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423016
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This is a reland of 76b80eca64
Original change's description:
> Use GL_ANGLE_instanced_arrays
>
> It turns out the es2 command buffer has supported instanced rendering
> all along. We just weren't using it! This CL starts using
> GL_ANGLE_instanced_arrays, after which point chrome es2 will start
> taking many of our instanced codepaths. It can even use tessellation if
> we update the shaders to not rely on gl_VertexID.
>
> Bug: chromium:1220246
> Change-Id: I173f4c07771691143d2540ecb9c3f8222ed8e4b3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422379
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: chromium:1220246
Change-Id: I4d6f74adff4e2eda4b55a459faf16b5f5a230d06
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422616
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Adds the ability to create an es3 command buffer context, but does not
yet begin testing it because libcommand_buffer_gles2.dylib needs to be
updated first to respect the EGL_CONTEXT_CLIENT_VERSION attrib. Adds a
version check on the context as well to verify we actually get an es3
context when we ask for one.
Bug: chromium:1220246
Change-Id: I996f482d8ad831b81f873e1bfd2f0526e5f1e73e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419616
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit 76b80eca64.
Reason for revert: Chrome layout test diffs
Original change's description:
> Use GL_ANGLE_instanced_arrays
>
> It turns out the es2 command buffer has supported instanced rendering
> all along. We just weren't using it! This CL starts using
> GL_ANGLE_instanced_arrays, after which point chrome es2 will start
> taking many of our instanced codepaths. It can even use tessellation if
> we update the shaders to not rely on gl_VertexID.
>
> Bug: chromium:1220246
> Change-Id: I173f4c07771691143d2540ecb9c3f8222ed8e4b3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422379
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
TBR=bsalomon@google.com,csmartdalton@google.com
Change-Id: I62c25be4f6cf6937c0b5ab6e765a7113aad76916
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1220246
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422441
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
The make_lotties_with_assets is a handy tool to take a
directory of lottie files and move them into their own
folders. This will make it easier to add assets (e.g. fonts,
images) if we want to get more accurate benchmarks.
This also makes the test not stop on the first failure, but complete
all of them, so we can see more easily if multiple things have broken.
Change-Id: Idb2ece71376a11e7524cd513a2798884a44bb59f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421927
Reviewed-by: Florin Malita <fmalita@google.com>
We also catch any errors that happen during running the
test or flushing. This allows them to show up in the CI logs.
For skottie-frames in particular, we stop clearing the canvas
before each render, as that was masking an error (and not how
we do things on skottie.skia.org).
Change-Id: I83936a35b6c314da76a0a64e15deaabd156e71f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421923
Reviewed-by: Kevin Lubick <kjlubick@google.com>
It turns out the es2 command buffer has supported instanced rendering
all along. We just weren't using it! This CL starts using
GL_ANGLE_instanced_arrays, after which point chrome es2 will start
taking many of our instanced codepaths. It can even use tessellation if
we update the shaders to not rely on gl_VertexID.
Bug: chromium:1220246
Change-Id: I173f4c07771691143d2540ecb9c3f8222ed8e4b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422379
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This is a reland of e58831cd95
Original change's description:
> Add format-specifier warnings to SkDebugf.
>
> This CL fixes up many existing format-specifier violations in Skia.
> Note that GCC has a warning for formatting nothing, so existing calls to
> `SkDebugf("")` have been removed, or replaced with `SkDebugf("%s", "")`.
> These were apparently meant to be used as a place to set a breakpoint.
>
> Some of our clients also use SkDebug with bad format specifiers, so this
> check is currently only enabled when SKIA_IMPLEMENTATION is true.
>
> Change-Id: I8177a1298a624c6936adc24e0d8f481362a356d0
> Bug: skia:12143
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420902
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:12143
Change-Id: Id3c0c21436ebd13899908d5ed5d44c42a0e23921
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421918
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit e58831cd95.
Reason for revert: looks like breaking a few build bots
Original change's description:
> Add format-specifier warnings to SkDebugf.
>
> This CL fixes up many existing format-specifier violations in Skia.
> Note that GCC has a warning for formatting nothing, so existing calls to
> `SkDebugf("")` have been removed, or replaced with `SkDebugf("%s", "")`.
> These were apparently meant to be used as a place to set a breakpoint.
>
> Some of our clients also use SkDebug with bad format specifiers, so this
> check is currently only enabled when SKIA_IMPLEMENTATION is true.
>
> Change-Id: I8177a1298a624c6936adc24e0d8f481362a356d0
> Bug: skia:12143
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420902
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: I07848c1bf8992925c9498e916744d0840355a077
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12143
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421917
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
This CL fixes up many existing format-specifier violations in Skia.
Note that GCC has a warning for formatting nothing, so existing calls to
`SkDebugf("")` have been removed, or replaced with `SkDebugf("%s", "")`.
These were apparently meant to be used as a place to set a breakpoint.
Some of our clients also use SkDebug with bad format specifiers, so this
check is currently only enabled when SKIA_IMPLEMENTATION is true.
Change-Id: I8177a1298a624c6936adc24e0d8f481362a356d0
Bug: skia:12143
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420902
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
The previous version accidentally retrieved all values from
the in memory glyph cache because it was always measuring
the range 1-300. This changes the glyphID to always be an
increasing number, which avoids the cache hits.
There is now some differences between the font types:
- ttf: ~4ms
- woff: ~160ms
- woff2: ~230ms
The high numbers in the woff categories are expected to be
fixed by https://skia-review.googlesource.com/c/skia/+/420578
Bug: skia:12112
Change-Id: I52f6f7baf27fc28b99ac65a067142281918d7298
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421324
Reviewed-by: Kevin Lubick <kjlubick@google.com>
It is no longer used. The example runner uses the registry and fiddle
checks for the '#if'.
Change-Id: I1213702e89cc4927108eeeabcc10501b30eab934
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205588
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Rewrites tessellation atlases as normal render tasks instead of
"onFlush" tasks. These tasks get inserted into the DAG upfront, lay
out their atlases as dependent tasks get built and reference them, and
finally add their ops to render themselves during onMakeClosed. Doing it
this way allows us to pause the flush and re-render the atlas whenever
it runs out of room.
Bug: b/188794626
Bug: chromium:928984
Change-Id: Id59a5527924c63d5ff7c5bce46a88368e79fc3ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420556
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Change-Id: I015cc2401c9f4a87fa7a02a93890bcf0a6704a91
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420901
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
As is, all 3 formats have a median time of about 0.12 milliseconds.
Perhaps the performance hit is more strongly felt on larger font
files.
Bug: skia:12112
Change-Id: Ifb4b0aa5a8240d93e94f4b674d0a50e6009887ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420097
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This is a reland of 7bf6bc0d06
Original change's description:
> Purge ccpr
>
> Now that the clip atlas has been successfully migrated to
> tessellation, we don't need this code anymore!
>
> Change-Id: Ic97f50cff7c4ee59f4476f8410f0b30a32df4e90
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419857
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Change-Id: If0be86902e7cc4755eba91a89be1ec1a6a4b54b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419720
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Change-Id: Ib45c569e3bbfeb41003ca9c261408840fb0af9dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419897
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
This reverts commit 7bf6bc0d06.
Reason for revert: Android build references kCoverageCounting
Original change's description:
> Purge ccpr
>
> Now that the clip atlas has been successfully migrated to
> tessellation, we don't need this code anymore!
>
> Change-Id: Ic97f50cff7c4ee59f4476f8410f0b30a32df4e90
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419857
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
TBR=robertphillips@google.com,brianosman@google.com,csmartdalton@google.com,michaelludwig@google.com
Change-Id: I01d99287978f848eb8bf900c07cba90ceb3b6edc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419898
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Now that the clip atlas has been successfully migrated to
tessellation, we don't need this code anymore!
Change-Id: Ic97f50cff7c4ee59f4476f8410f0b30a32df4e90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419857
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
The Tessellator classes will survive in the NGA and they use
GrMeshDrawOp::Target - but GrMeshDrawOp will not survive.
This is a prelude to making all the remaining GrOp-derived classes OGA-only.
Bug: skia:11837
Change-Id: I62dc92e5f42d672342113f12dcedf3435fab993f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419198
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This is almost purely a query/replace CL (% the #include juggling).
The VisitProxyFunc is used by more than just the Ops and will probably
still be required in the NGA.
This is a prelude to making all the remaining GrOp-derived classes OGA-only.
Bug: skia:11837
Change-Id: If1c127e5c126c676be529ed2a61dd7953abb03d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419162
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: Ia1c775fffff7086ecc1e672792921d2146abd0f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419158
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This was a particularly bad hash (A == B didn't imply
hash(A) == hash(B)). It was also entirely unused.
Change-Id: Id923bf1035effce04e12b1cc01d1c6aa4d11fdb6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419336
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Bug: skia:11837
Change-Id: I92aacf8b412d0158036a5f27aa767590e426bd5c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417657
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This CL preserves the "StringFragment" name as an alias for
string_view to reduce the impact. The StringFragment alias
will be removed in a followup CL.
Change-Id: I89209bc626b0be0d0190823b6217f4c83cafe1bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/416736
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Change-Id: Id2f0b65a28424868e1b897688bcd451041698da4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417000
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
`constexpr char` arrays in header files generate a separate object in
each translation unit; we should add `inline` to these.
http://go/totw/140#within-a-header-file-beware
Change-Id: I7e2dd8f81053577127e349e9dc4a691e432c2c05
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/416780
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
The GTX 1080 Ti with driver version 466.47 wants to enable
VK_NV_acquire_winrt_display, which depends on VK_EXT_direct_mode_display
but VK_EXT_direct_mode_display is not one of its available device
extensions. This leads to correct validation errors that prevent viewer
from launching in debug mode.
Change-Id: I989477861007d7a5baa529698ffd86910618b9f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415173
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
While the SDC-accessing versions have to stick around due to their
usage in unit tests, they will return null when exercising the NGA.
The render-target-proxy versions will work in both the OGA and NGA
and should, thus, be prefered.
Bug: skia:11837
Change-Id: I36213472e46e9da3ae6561f80d413090ceb6ad3e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415058
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Bumps [ws](https://github.com/websockets/ws) from 7.3.0 to 7.4.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/websockets/ws/releases">ws's releases</a>.</em></p>
<blockquote>
<h2>7.4.6</h2>
<h1>Bug fixes</h1>
<ul>
<li>Fixed a ReDoS vulnerability (00c425ec).</li>
</ul>
<p>A specially crafted value of the <code>Sec-Websocket-Protocol</code> header could be used
to significantly slow down a ws server.</p>
<pre lang="js"><code>for (const length of [1000, 2000, 4000, 8000, 16000, 32000]) {
const value = 'b' + ' '.repeat(length) + 'x';
const start = process.hrtime.bigint();
<p>value.trim().split(/ *, */);</p>
<p>const end = process.hrtime.bigint();</p>
<p>console.log('length = %d, time = %f ns', length, end - start);
}
</code></pre></p>
<p>The vulnerability was responsibly disclosed along with a fix in private by
<a href="https://github.com/robmcl4">Robert McLaughlin</a> from University of California, Santa Barbara.</p>
<p>In vulnerable versions of ws, the issue can be mitigated by reducing the maximum
allowed length of the request headers using the <a href="https://nodejs.org/api/cli.html#cli_max_http_header_size_size"><code>--max-http-header-size=size</code></a>
and/or the <a href="https://nodejs.org/api/http.html#http_http_createserver_options_requestlistener"><code>maxHeaderSize</code></a> options.</p>
<h2>7.4.5</h2>
<h1>Bug fixes</h1>
<ul>
<li>UTF-8 validation is now done even if <code>utf-8-validate</code> is not installed
(23ba6b29).</li>
<li>Fixed an edge case where <code>websocket.close()</code> and <code>websocket.terminate()</code> did
not close the connection (67e25ff5).</li>
</ul>
<h2>7.4.4</h2>
<h1>Bug fixes</h1>
<ul>
<li>Fixed a bug that could cause the process to crash when using the
permessage-deflate extension (92774377).</li>
</ul>
<h2>7.4.3</h2>
<h1>Bug fixes</h1>
<ul>
<li>The deflate/inflate stream is now reset instead of reinitialized when context
takeover is disabled (<a href="https://github-redirect.dependabot.com/websockets/ws/issues/1840">#1840</a>).</li>
</ul>
<h2>7.4.2</h2>
<h1>Bug fixes</h1>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="f5297f7090"><code>f5297f7</code></a> [dist] 7.4.6</li>
<li><a href="00c425ec77"><code>00c425e</code></a> [security] Fix ReDoS vulnerability</li>
<li><a href="990306d144"><code>990306d</code></a> [lint] Fix prettier error</li>
<li><a href="32e3a8439b"><code>32e3a84</code></a> [security] Remove reference to Node Security Project</li>
<li><a href="8c914d18b8"><code>8c914d1</code></a> [minor] Fix nits</li>
<li><a href="fc7e27d12a"><code>fc7e27d</code></a> [ci] Test on node 16</li>
<li><a href="587c201bfc"><code>587c201</code></a> [ci] Do not test on node 15</li>
<li><a href="f672710797"><code>f672710</code></a> [dist] 7.4.5</li>
<li><a href="67e25ff502"><code>67e25ff</code></a> [fix] Fix case where <code>abortHandshake()</code> does not close the connection</li>
<li><a href="23ba6b2922"><code>23ba6b2</code></a> [fix] Make UTF-8 validation work even if utf-8-validate is not installed</li>
<li>Additional commits viewable in <a href="https://github.com/websockets/ws/compare/7.3.0...7.4.6">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ws&package-manager=npm_and_yarn&previous-version=7.3.0&new-version=7.4.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/google/skia/network/alerts).
</details>
This is an imported pull request from
https://github.com/google/skia/pull/80
GitOrigin-RevId: a9a98b522212ab86f81c15979a3550ea7e276edb
Change-Id: Ia61edf467fb25d96bed7066b9355975005ca6393
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415377
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
At present, only Xfer processors allow reading back from the destination
image since they are in charge of blending. However, we'd like to expose
the destination color to fragment processors and Runtime Effects in the
future. To make this possible, the DstProxyView will need to be
accessible outside of Xfer processors.
This CL migrates DstProxyView to be a top-level Ganesh class and fixes
up the references to it throughout Skia. It's interesting to note that
several call sites were already using typedefs to hide the class
nesting anyway.
Change-Id: I93a294aa097f9319a968503c4f2f7e4f388ff033
Bug: skia:12066
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414899
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
We did this to allow pipelining of GPU/CPU work in nanobench on devices
that don't have GL sync objects (or NV fence). However, we've found
that on the AndroidOne/Mali400 and Nexus7/Tegra3 devices that the
majority of a frame's work can be reordered to complete before an
earlier EGL sync. This makes the results unreliable, especially the
min_ms result. Just accept that we will sync the CPU and GPU on these
devices.
Change-Id: I04d168cbb05504d367f6a06b7b4903163ab2aa79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414897
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Change-Id: I4e00edd2d1572c3e2c1fcb56824239c166253cbc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/412958
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
These have been replaced by `sk try` and `sk release-branch`,
respectively.
Change-Id: Idc297dd7c84a87a09f69f310de495f91fcce36b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409898
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
This reverts commit 789ec0533e.
Reason for revert: Not ready for this yet
Original change's description:
> Temporarily disable reordering on bots again
>
> To be landed after CL 412636. This should give us a clearer picture of
> the perf impact of reordering, now that the fence issue is mitigated.
>
> Will flip it back after perf runs.
>
> Bug: skia:10877
> Change-Id: I255c68f148f7aaebacb2469a56b7eade6d41696c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/412638
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Auto-Submit: Adlai Holler <adlai@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=robertphillips@google.com,adlai@google.com
Change-Id: Idef91adade6f2814e472c70f71bd8d1b51aa4fa8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10877
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/412665
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
To be landed after CL 412636. This should give us a clearer picture of
the perf impact of reordering, now that the fence issue is mitigated.
Will flip it back after perf runs.
Bug: skia:10877
Change-Id: I255c68f148f7aaebacb2469a56b7eade6d41696c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/412638
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Now that hardware tessellators chop, support raw triangles, and can
handle any path, we don't need complicated logic anymore to determine
when we can't use them. This CL simplifies the criteria for selecting
a tessellation algorithm and adds a fAlwaysPreferHardwareTessellation
context option to override it.
Bug: skia:10419
Change-Id: I8492e8f285ff27eb9d0dd6b1e9817dbeeb386c63
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/411496
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Makes the code from yuv_splitter reusable and able to produce subsampled
planes.
Bug: chromium:1210557
Change-Id: Icce112658bbdb866c3ecb9dcff1a5e8d0d30135a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/411297
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit 9604eab2bd.
Reason for revert: Got perf data
Original change's description:
> Temporarily disable reduceOpsTaskSplitting on bots
>
> When we enabled this, at that time CCPR atlasing would
> auto-disable when reordering was enabled, so the perf
> impact was unclear.
>
> Since then, CCPR atlasing has been disabled for everyone,
> so let's flip this flag, get some perf data, and then flip it back.
>
> Bug: skia:10877
> Change-Id: I67f081981e84c573dfc2907018b50c740f3a32cc
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/411216
> Auto-Submit: Adlai Holler <adlai@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
Change-Id: Ic90be563da759b48f5aa3d9c951cfb76439ce604
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10877
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/411298
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
When we enabled this, at that time CCPR atlasing would
auto-disable when reordering was enabled, so the perf
impact was unclear.
Since then, CCPR atlasing has been disabled for everyone,
so let's flip this flag, get some perf data, and then flip it back.
Bug: skia:10877
Change-Id: I67f081981e84c573dfc2907018b50c740f3a32cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/411216
Auto-Submit: Adlai Holler <adlai@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Skia has an atlas clipping mode (historically called CCPR clipping) that
doesn't quite work. It will fail on blend modes that require a dst read
and is also drawing the complexclip_* tests wrong on several devices.
We plan to rewrite the clip atlas, but in the meantime we need to
disable the "CCPR" clipping.
Bug: b/188794626
Change-Id: I126030a2a81057ffca85fd8b8e7db97b716451ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408557
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Fixed: dawn:788
Change-Id: I2ec810fdd177aff61519192c234d5cb8cabe68d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409236
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@google.com>
Reviewed-by: Stephen White <senorblanco@google.com>
Also three fixes for drawing to offscreen layers in MSKPPlayer:
*Only play from last full redraw to next cmd
*Clear before full redraw
*Actually track current cmd in layer state.
Bug: skia:11900
Change-Id: I988afb61f96c8acb7e7554d65bfa6cd6020196c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407460
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I674f038600afd6d49316c1ece515941ee5579068
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406939
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This effectively reverts a80ce1a36d,
and goes back to using SkMakeSpan (which works in C++14).
Change-Id: Iaa63c86b5acaadbdd60588b0a5c703820e810770
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406938
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Currently our ANGLE vendor/renderer detection is based ANGLE's D3D
backends. To detect on the GL backend it'd be helpful to reuse the
normal GL detection after extracting the relevant GL backend strings
that ANGLE puts in GL_RENDERER in its GLES frontend. This is a step in
that direction.
Bug: 1203705
Change-Id: I5367c49e8aaee2e138088316566f95900b9c4831
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405689
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Should not change functionality.
Bug: 1203705
Change-Id: I2a17fb0ccb729033c964a138dbd5e86be7f93d9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405200
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Chromium has been updated to use makeAnalysisCanvas directly and there are
no more references to SkTextBlobDiffCanvas as a type in its code base.
Since the GlyphTrackingDevice extends SkNoPixelsDevice, any SkCanvas that
uses it is effectively a "no-draw" canvas. However, by returning a base
SkCanvas the text tracking now automatically happens in the context of
the base's AutoLayerForImageFilter handling it applies on every draw. This
means that drawing a text blob with an image filter that modifies the
transform state will now be analyzed in that context automatically
(simplifying code in chrome after this lands).
Another behavioral change is that all non-text draws will still go through
the base SkCanvas' virtuals and invoke the device function. Since it's an
SkNoPixelsDevice, it'll still be a no-op, it just happens a little later.
This won't really impact performance because oop-r already inspects their
operations and only plays back text and transform related ones to the
analysis canvas, so we shouldn't really see non-text draws being invoked
anyways.
Bug: chromium:1187246
Change-Id: I83f86571300751f385b3065dfe889f218fa1edc6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405196
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This is a reland of adadb95a9f
... adds a temporary workaround for some Android framework code.
Original change's description:
> Better first-class shader & color filter support in runtime effects
>
> This does a few things, because they're all intertwined:
>
> 1) SkRuntimeEffect's API now includes details about children (which Skia
> stage was declared, not just the name). The factories verify that the
> declared types in the SkSL match up with the C++ types being passed.
> Today, we still only support adding children of the same type, so the
> checks are simple. Once we allow mixing types, we'll be testing the
> declared type against the actual C++ type supplied for each slot.
> 2) Adds sample variants that supply the input color to the child. This
> is now the only way to invoke a colorFilter child. Internally, we
> support passing a color when invoking a child shader, but I'm not
> exposing that. It's not clearly part of the semantics of the Skia
> pipeline, and is almost never useful. It also exposes users to
> several inconsistencies (skbug.com/11942).
> 3) Because of #2, it's possible that we can't compute a reusable program
> to filter individual colors. In that case, we don't set the constant
> output for constant input optimization, and filterColor4f falls back
> to the slower base-class implementation.
>
> Bug: skia:11813 skia:11942
> Change-Id: I06c41e1b35056e486f3163a72acf6b9535d7fed4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401917
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
Bug: skia:11813 skia:11942
Change-Id: I2c31b147ed86fa8c4dddefb7066bc1d07fe0d285
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404637
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit adadb95a9f.
Reason for revert: breaking android
Original change's description:
> Better first-class shader & color filter support in runtime effects
>
> This does a few things, because they're all intertwined:
>
> 1) SkRuntimeEffect's API now includes details about children (which Skia
> stage was declared, not just the name). The factories verify that the
> declared types in the SkSL match up with the C++ types being passed.
> Today, we still only support adding children of the same type, so the
> checks are simple. Once we allow mixing types, we'll be testing the
> declared type against the actual C++ type supplied for each slot.
> 2) Adds sample variants that supply the input color to the child. This
> is now the only way to invoke a colorFilter child. Internally, we
> support passing a color when invoking a child shader, but I'm not
> exposing that. It's not clearly part of the semantics of the Skia
> pipeline, and is almost never useful. It also exposes users to
> several inconsistencies (skbug.com/11942).
> 3) Because of #2, it's possible that we can't compute a reusable program
> to filter individual colors. In that case, we don't set the constant
> output for constant input optimization, and filterColor4f falls back
> to the slower base-class implementation.
>
> Bug: skia:11813 skia:11942
> Change-Id: I06c41e1b35056e486f3163a72acf6b9535d7fed4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401917
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,bsalomon@google.com,brianosman@google.com
Change-Id: I94ba57e73305b2302f86fd0c1d76f667d4e45b92
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11813 skia:11942
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404117
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This does a few things, because they're all intertwined:
1) SkRuntimeEffect's API now includes details about children (which Skia
stage was declared, not just the name). The factories verify that the
declared types in the SkSL match up with the C++ types being passed.
Today, we still only support adding children of the same type, so the
checks are simple. Once we allow mixing types, we'll be testing the
declared type against the actual C++ type supplied for each slot.
2) Adds sample variants that supply the input color to the child. This
is now the only way to invoke a colorFilter child. Internally, we
support passing a color when invoking a child shader, but I'm not
exposing that. It's not clearly part of the semantics of the Skia
pipeline, and is almost never useful. It also exposes users to
several inconsistencies (skbug.com/11942).
3) Because of #2, it's possible that we can't compute a reusable program
to filter individual colors. In that case, we don't set the constant
output for constant input optimization, and filterColor4f falls back
to the slower base-class implementation.
Bug: skia:11813 skia:11942
Change-Id: I06c41e1b35056e486f3163a72acf6b9535d7fed4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401917
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Bug: skia:11900
Change-Id: I97d1f2a9523252318ffb4f479b197cb0ef9cf0b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402920
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>