Commit Graph

2007 Commits

Author SHA1 Message Date
Kevin Lubick
29a8e48613 [canvaskit] Deploy v0.34.1
Change-Id: I978a33e6827a00701a51a818cc43e864e1645af3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/546416
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2022-06-02 17:41:31 +00:00
Kevin Lubick
ee62fad9a4 [bazel] Add "skia_internal" target that exposes private API for tests/tools.
Organization v3.5, if we are keeping track :)

This splits the "srcs" filegroup into "srcs" and "private_hdrs",
and renames "hdrs" to "public_hdrs".

To assist with the split, I created the macro split_srcs_and_hdrs.
Rather than keep two separate lists of header and source files,
I figured it would be easiest, at least for the common case,
to keep one list of files and then have a for loop split them
apart. I've tried to be consistent with having the list
of files be named with a _FILES suffix - maybe we can use this
as a marker to generate .gni files in the future?

Suggested review order:
 - //bazel/macros.bzl. Note this needs a corresponding
   G3 change (http://cl/452279799) as well. The exports_files_legacy
   change is the better approach to something I manually
   handled yesterday when fixing the G3 roll.
 - //BUILD.bazel to see the new target skia_internal and
   the previous skia_core renamed to skia_public.
 - //src/core/BUILD.bazel to see a typical usage of
   split_srcs_and_hdrs.
 - //include/... to see the change to public_hdrs and
   private_hdrs
 - //src/... to see many more usages of split_srcs_and_hdrs
 - //tools/... to see changes to skia_internal where
   appropriate.
 - Everything else. Note that //modules/... might also need
   to be built with skia_internal instead of skia_public,
   but we can fix that up later, if necessary.

Change-Id: Ie1cc969455d97b029b2d77faa222c4a9bad70671
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545716
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
2022-06-02 11:23:50 +00:00
Julia Lavrova
d1e84595fb Returning back offsets for glyphs
(to fix non-monotonic glyph placement)
With Google3 test failure in Samples
showing that it's not SkParagraph fault but
rather a result of this fix.

Change-Id: I72e025cdaf806bae0e8a8337074f75af5af428b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544336
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2022-05-31 18:58:52 +00:00
Jason Simmons
153bd188e6 Clear the hard line break flag when resetting the TextWrapper
See https://github.com/flutter/flutter/issues/104208

Change-Id: I963fc77931014ed3c312a3e2667dc3e8cb31fe2b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544116
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Jason Simmons <jsimmons@google.com>
2022-05-31 16:15:17 +00:00
Kevin Lubick
c123b5a93d [bazel] Add rules for CanvasKit and dependent modules
This may look like a lot, but //modules/canvaskit/BUILD.bazel
is nearly identical to how it was with gazelle:
162dfca340/modules/canvaskit/BUILD.bazel

I removed the "wasm_gm_tests" targets from it, because they
had bitrotted slightly and fixing them is its own task.

CanvasKit depends on Skottie and Particles, which depend on
the SkParagraph, SkShaper, SkUnicode, and SkResources modules.

I've structured the BUILD.bazel files in the //modules directory
in a similar fashion as the "hierarchical filegroup"
introduced in https://skia-review.googlesource.com/c/skia/+/543977

Suggested Review Order
 - //modules/skottie/...
 - //modules/skparagraph/...
 - all other modules.
 - Note that modules/canvaskit/go/gold_test_env/BUILD.bazel is
   generated from gazelle, because we like how gazelle handles
   golang files and deps.
 - All other files in any order.

Change-Id: I0aa9e6f81dba2c00f15cae7b19fe49a2027dcf1d
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544676
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
2022-05-31 14:14:54 +00:00
Kevin Lubick
4511c7b7fb [bazel] Delete gazelle-based BUILD.bazel files
gazelle ended up being more liability than asset for our C++ rules.

It required devs to manually run the command frequently (and was
easy to forget until the CQ failed). The fact that we still had to
edit the source files (e.g. the "srcs" cc_libraries) meant that
the mixture between generated and hand-written caused some
tension (see include/third_party/vulkan for a good example).

The combination of gazelle and our IWYU enforcement added several
bits of churn without any real benefit. The generated rules
also didn't help identify cases where we were not keeping tight
boundaries (e.g. non-gpu code and gpu code).

Identifying third_party deps automatically ended up being trickier
than anticipated (see the deleted //third_party/file_map_for_bazel.json)

Using the "maximum set of dependencies" worked ok, but ended up
increasing build time unnecessarily. For example, compiling
CanvasKit for WebGL always needed to compile Dawn because
SkSLCompiler.cpp sometimes needs to include tint/tint.h.

Follow-up CLs will rebuild the BUILD.bazel rules without gazelle.

Note to Reviewers:
 - The only file worth manually reviewing here is bazel/Makefile.

Change-Id: I36d6fc3747487fabaf699690780c95f1f6765770
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543976
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-05-31 14:14:54 +00:00
Jorge Betancourt
13fda2a4e7 implement animatable particle drawables
this change relands: https://skia-review.googlesource.com/c/skia/+/538042

It addresses the problem that skqp was excluding skottie source files but still loading particles.

Change-Id: I8849c5285bd2c41b76c2e5fd77b06eca0184719e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542144
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2022-05-26 19:03:31 +00:00
Jason Simmons
945d04d2fe Shift glyphs only by the horizontal offset in OneLineShaper::finish
See https://github.com/flutter/flutter/issues/104092

Change-Id: Ib055f494eca074d73edf2f27a8f5b95139ab77bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543756
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Jason Simmons <jsimmons@google.com>
2022-05-25 18:53:24 +00:00
Jason Simmons
3860cfd7b4 Apply styles when painting lines containing only placeholders
See https://github.com/flutter/flutter/issues/104077#issuecomment-1133771312

Change-Id: I7522ecdc943a3629f902369d2116456dc9202bb6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543758
Commit-Queue: Jason Simmons <jsimmons@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2022-05-25 18:47:24 +00:00
Kevin Lubick
88e0e75380 [canvaskit] Fix uniform handling for makeShader and MallocObj
shaders.skia.org was passing in a Malloc'd TypedArray for uniforms
(to avoid unnecessary copying of that buffer on every frame).

However, CanvasKit would always take ownership of that buffer and
free it when the shader was freed. CanvasKit should only take
ownership (and clean up) the uniform buffer if it was not
copied into pre-malloc'd memory.

This also adds a handy make target that builds CanvasKit
and copies it into the proper place in the infra repository
to run the shaders app locally.

See also: https://skia-review.googlesource.com/c/buildbot/+/543436

Change-Id: I6c6b7f94f8c8571f9ce0613ccdd7fceb0f315a12
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543416
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-05-24 16:33:17 +00:00
Michael Ludwig
0221e79b8b Remove SkNx entirely
Also cleans up the scattered references remaining in the code base
(including in files I thought I got already...).

Change-Id: I7004354b1e9cea9f9d9f45b791d8ab9ce557ba01
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542647
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-05-24 15:57:57 +00:00
Kevin Lubick
e526b7ed68 [canvaskit] Expose Canvas.getDeviceClipBounds()
Change-Id: Ie70e34873e755701fcfb04d0fcedf796ad9a4516
Bug: skia:13347
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543296
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-05-24 13:28:25 +00:00
Kevin Lubick
7ca19d2a56 [pathkit] Expose res_scale
Bug: skia:13301
Change-Id: I20be23d748afca28012e39dfc62898ac0f25614b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541536
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-05-23 17:46:48 +00:00
Jason Simmons
8c30cab578 Return the width of a placeholder in iterateThroughSingleRunByStyles
Also avoid visiting the text run that contains the placeholder
character.

See https://github.com/flutter/flutter/issues/104077

Change-Id: I1c9792f165c7fa971dbf13ba3130f1a787065d0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541790
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Jason Simmons <jsimmons@google.com>
2022-05-19 22:08:54 +00:00
Jorge Betancourt
7f99451720 [particles] add support for multiframe asset bindings
Change-Id: I19df412434e755cbd08883639211372d358f9137
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540747
Reviewed-by: Florin Malita <fmalita@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2022-05-19 19:39:12 +00:00
Jason Simmons
29996e85c2 Fix an off-by-one affecting letter spacing in Flutter
See https://github.com/flutter/flutter/issues/103705

Change-Id: I8b2a91af907e05fd3af144af35ebf498d7357ddd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541978
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Jason Simmons <jsimmons@google.com>
2022-05-19 17:25:08 +00:00
Jason Simmons
4220ffbaf2 Fix the start/end indexes used for font features in SkParagraph
Font feature start/end indexes must be relative to the start of the utf8
buffer passed to SkShaper.  SkParagraph had been passing indexes based on
the start of the block.

See https://github.com/flutter/flutter/issues/103615

Change-Id: Ie15611cb05e3532fc34d66724ac347b9bddc3c8c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540157
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Jason Simmons <jsimmons@google.com>
2022-05-17 00:40:39 +00:00
Florin Malita
2418c88fb1 [skottie] Fix Sphere effect lighting for transparency
Colors are premultiplied, so the specular component (which is additive)
must be modulated by alpha explicitly.

Change-Id: If5f7b456b0ce518b1806e9b1e754229c3a6d0981
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/539559
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-05-12 18:45:11 +00:00
Derek Sollenberger
d4aa36a9b6 Revert "create ParticleDrawable for animated Skotties"
This reverts commit ddd64d35c6.

Reason for revert: breaking the android build

Original change's description:
> create ParticleDrawable for animated Skotties
>
> Change-Id: Ieaea5e9c358604a25f0fecd7bac71a0450359653
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538042
> Reviewed-by: Florin Malita <fmalita@google.com>
> Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Change-Id: Ida2bfe6359790a49a8c2b4f8a3b96d9b14da5600
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/539083
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Derek Sollenberger <djsollen@google.com>
2022-05-11 23:35:08 +00:00
Jorge Betancourt
ddd64d35c6 create ParticleDrawable for animated Skotties
Change-Id: Ieaea5e9c358604a25f0fecd7bac71a0450359653
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538042
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-05-11 17:44:53 +00:00
Brian Osman
8b3731b336 Move settings tweak for "generic" programs into the compiler
Change-Id: I4643cc4c1f75deab279625e752b9fee7da2e2779
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/539039
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-05-10 17:49:36 +00:00
Kevin Lubick
a683fe6c00 [canvaskit] Deploy 0.34.0
Change-Id: I0afd3eae5bfdc3b64158771fe1d6100552d99c07
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537676
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2022-05-05 19:35:46 +00:00
Kevin Lubick
8d2fb64247 [canvaskit] Always serialize Typeface data into SKPs
Before: http://screen/4gnRTnRGyBuEsA9
After: http://screen/5jdoRcED7X3Taf7

There's a few misc fixes related to Bazel rules and tests too.

Change-Id: I2ac272fe5312c2a825944259f2f9031fff9887e0
Bug: skia:13247
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535477
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-05-05 15:43:32 +00:00
Brian Osman
ced9ccec0e Remove the unnecessary SkPaint parameter to SkParticleDrawable
This was originally present to control filter mode, and was never
removed when filtering decisions were placed on the SkShader.

Change-Id: I2b91f02f994c508fd986cd1b3e28fa97f15d8469
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536496
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-05-03 17:58:47 +00:00
Ben Wagner
d3a9923ea2 [svg] Add support for var in color parsing.
In OT-SVG `var` support is required for palette use. Even without
palette support this is needed to get the fallback color.

Change-Id: Iea8c4502b57933115f5cbf44fcc183fef19da984
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534140
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-05-03 14:34:35 +00:00
Kevin Lubick
c3a448ec61 [bazel] Put licenses() after legacy_exports
G3 prefers license() first.

This was done mechanically with a big find/replace

Change-Id: I8c33c7bc10a6bec42e966cad81c259954e841811
Bug: skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535898
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-05-02 15:04:33 +00:00
Kevin Lubick
46eaab3959 [bazel] Add shims to help translation into G3
Ran the following commands:
find -name "BUILD.bazel" -exec sed -i -e '1iload("//bazel:macros.bzl", "cc_library", "exports_files_legacy")\nexports_files_legacy()' {} +
buildifier --lint=fix --mode=fix -r .

This had the effect of making sure we can export all of our
files in G3 (until we no longer have legacy targets) and
making all of our cc_libraries shim-able.

bazel/macros.bzl has the human-contributed changes, the rest
were mechanical.

Change-Id: I8e24e30e74b038cfd072cdbe4078bfd1d213dd46
Bug: skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535359
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-04-29 19:27:54 +00:00
Brian Salomon
efb32fe3c0 Fix -Wunused-but-set-variable warnings
Change-Id: I5a044983e3de84901f29bddca5503167edc8fcee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535436
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-04-29 15:20:59 +00:00
Kevin Lubick
62f57a02b3 [includes] Enforce IWYU on src/utils
Client changes:
 - cl/443664347
 - cl/444232853
 - http://ag/17915718
 - http://ag/17913178
 - https://crrev.com/c/3602239

Change-Id: I16bcdbbe2b13bbf52f007b0f131e9ee0c14ed237
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532257
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-04-28 17:32:20 +00:00
Jason Simmons
c35e492a19 ParagraphBuilder efficiency improvements and simplification
* Use SkSTArray instead of stack/deque for fTextStyles
* Use fParagraphStyle for the base style instead of pushing an extra copy
  into fTextStyles
* Call endRunIfNeeded only when starting a new styled block

Change-Id: I5f80c052a7589d8da7e6a797b155884efd5449a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533983
Commit-Queue: Jason Simmons <jsimmons@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2022-04-27 17:57:00 +00:00
Ben Wagner
baa665a6db [svg] Treat empty viewBox and viewPort as singular.
An empty viewPort should always send everything to a point. An empty
viewBox should either draw nothing or fill the viewPort with the color
of a single point of no area.

Change-Id: I0d4f0cea3918acc4edc98043f3a7155e4e171bff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533809
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-04-27 14:38:51 +00:00
Kevin Lubick
b391fde789 [bazel] Fix typo not caught by Gazelle
The Gazelle extension does not verify the hdr/src name (yet).

Bug: skia:12541
Change-Id: Ibd9fd4663d643e864ccc6977bd3c928f722d6c3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533804
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-04-26 16:57:12 +00:00
Ben Wagner
9cbadcd928 Add optional OT-SVG support to FreeType
Bug: skia:12290
Change-Id: I064bee781d3a714e46f102cb48494fbe8f3e46e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516436
Reviewed-by: Florin Malita <fmalita@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-04-25 18:51:01 +00:00
Harry Terkelsen
50012bd88e Enable WASM cross-compilation by correctly using current_cpu
Change-Id: I5964d330f87949fd214873693204a153d22282a8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529205
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-04-20 11:31:35 +00:00
Brian Salomon
2386d3e7d6 mipMapped -> mipmapped
Change-Id: Ib9d4e23159724825dacb7d37ceabfd2aff68f58a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/530681
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-04-18 14:26:19 +00:00
Julia Lavrova
62f07d262c Like breaking for a single line text
Change-Id: Ib9955d56bcf658aa78eb8dc8d5c48e8ccdf01581
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528440
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2022-04-15 14:47:49 +00:00
Kevin Lubick
83cee23c98 [bazel] Run buildifier on BUILD.bazel files
buildifier --lint=fix -r .

Change-Id: I6a41858270d20137978f8271c8f6160b51120777
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529751
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-04-14 18:13:43 +00:00
Kevin Lubick
b98328a27b [bazel] Add license to all our BUILD.bazel files
find -name "BUILD.bazel" -exec sed -i -e '1i licenses(["notice"])\n' {} +

Change-Id: Ie48f163b7d8d6ede9ba5f952e87232dd5c9fa8e6
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529808
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-04-13 19:50:29 +00:00
Kevin Lubick
196b172650 [sksl] Make sksl tracing optional
This removes the required dependency on our JSON code. In the Bazel
rules, this dependency is pushed down into sksl instead of required
by the cc_binary rules.

It adds a stub version of SkVMDebugTrace.cpp and removes
SkVMDebugTracePlayer unless the appropriate GN or Bazel flag
is set (skia_enable_sksl_tracing and enable_sksl_tracing,
respectively). There was an existing #define that CanvasKit
used (CK_INCLUDE_SKSL_TRACE) and this was changed to
SKSL_ENABLE_TRACING.

Users of //:skia_core no longer need to specify a JSON dep,
if sksl needs it (e.g. for tracing), then it will specify
the dependency.

This is a reland of https://skia-review.googlesource.com/c/skia/+/528837

Bug: skia:12541
Change-Id: I79612c69fdbefd3db9822a2b66df7552f7c13865
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529278
Reviewed-by: John Stiles <johnstiles@google.com>
2022-04-12 13:59:25 +00:00
John Stiles
471fd2eb09 Revert "[sksl] Make sksl tracing optional"
This reverts commit 6bc4bdf645.

Reason for revert: Android roll

Original change's description:
> [sksl] Make sksl tracing optional
>
> This removes the required dependency on our JSON code. In the Bazel
> rules, this dependency is pushed down into sksl instead of required
> by the cc_binary rules.
>
> It adds a stub version of SkVMDebugTrace.cpp and removes
> SkVMDebugTracePlayer unless the appropriate GN or Bazel flag
> is set (skia_enable_sksl_tracing and enable_sksl_tracing,
> respectively). There was an existing #define that CanvasKit
> used (CK_INCLUDE_SKSL_TRACE) and this was changed to
> SKSL_ENABLE_TRACING.
>
> Users of //:skia_core no longer need to specify a JSON dep,
> if sksl needs it (e.g. for tracing), then it will specify
> the dependency.
>
> Change-Id: I2fcd29cde118fc391c269ba2d8f8a40a6f164c99
> Bug: skia:12541
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528837
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>

Bug: skia:12541
Change-Id: Icf75495f19e409d96925ca4dca9e839eca4057ec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529129
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-04-11 17:42:17 +00:00
Kevin Lubick
6bc4bdf645 [sksl] Make sksl tracing optional
This removes the required dependency on our JSON code. In the Bazel
rules, this dependency is pushed down into sksl instead of required
by the cc_binary rules.

It adds a stub version of SkVMDebugTrace.cpp and removes
SkVMDebugTracePlayer unless the appropriate GN or Bazel flag
is set (skia_enable_sksl_tracing and enable_sksl_tracing,
respectively). There was an existing #define that CanvasKit
used (CK_INCLUDE_SKSL_TRACE) and this was changed to
SKSL_ENABLE_TRACING.

Users of //:skia_core no longer need to specify a JSON dep,
if sksl needs it (e.g. for tracing), then it will specify
the dependency.

Change-Id: I2fcd29cde118fc391c269ba2d8f8a40a6f164c99
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528837
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-04-11 15:22:41 +00:00
Julia Lavrova
55c56abac3 Simplify the most commont paint case
Change-Id: Ie6efa0cdcf682ad7ea5c1d4ca6232af6224a68f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527282
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2022-04-08 14:20:38 +00:00
Greg Daniel
719239cd69 Move all Ganesh source files into ganesh subdirectory.
Change-Id: I238d29ba0250224fa593845ae65192653f58faff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528156
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-04-07 21:06:50 +00:00
Kevin Lubick
d3d0ee3dc2 [debugger] Fix missing audit trails
Change-Id: I337aebf72715339ec0280bab0916968ccbe7f481
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528516
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-04-07 19:52:09 +00:00
Florin Malita
ad324a31e6 [skottie] Remove legacy whitespace guard
No longer used.

Change-Id: Id68a8d4340bc685c938ab22619f2b4067b3f9206
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528163
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2022-04-07 15:06:48 +00:00
Kevin Lubick
174a9c5330 [debugger] Fix externs
This also adds a make target to build a release version of
the debugger, which is handy when we want to push a fix
quickly. The make targets will also create the local_build
folder in the infra repo if it does not exist.

Change-Id: I073615a35068c425608454311a51c0c4e0a8152a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527181
Reviewed-by: Brian Osman <brianosman@google.com>
2022-04-04 20:38:18 +00:00
Julia Lavrova
597877ab4a Simplify or even skip glyph spacing if possible
Change-Id: Ibcf5db117b338c9a4c0582067e63e98f55e25a3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526271
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2022-04-04 18:35:14 +00:00
Kevin Lubick
af31b20181 [canvaskit] Copy additional file needed for local debugger build
Change-Id: I8f5f24eaf340e8cf2479a2771fbb1d09bb311ab4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527136
Reviewed-by: Brian Salomon <bsalomon@google.com>
2022-04-04 14:31:39 +00:00
Florin Malita
de6af36e6e [skottie] Fix white-space/horizontal-alignment interactions
AE alignment semantics:

  - leading white-space counts (i.e. "pushes" the line to the right
    in left/center alignment mode)
  - trailing white-space is ignored (does not push the line to the left
    in center/right alignment mode)

Skottie currently always takes white-space into account.  This yields
incorrect center/right alignment not just in the presence of explicit
trailing WS, but also due to residual WS from paragraph line breaks.

To fix, detect trailing WS for each committed line, and adjust glyph
positions to compensate.

Change-Id: Id8589cb30f743f21d77961c0eb4fa20a97e5f13c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526457
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2022-04-01 18:54:14 +00:00
Ben Wagner
b198752832 Correct FontArguments.h location in build file.
Change-Id: Ia12c07752a9d31dfbf846f2cd2bb63d47532d6f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526677
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2022-04-01 18:09:18 +00:00