Commit Graph

7 Commits

Author SHA1 Message Date
Herb Derby
a889f614fb Enable Slug GM without need for defines
There is enough Slug infrastructure in place that this can be
turned on without the need for -D flags. This allows Slugs
to be tested in the CQ.

Change-Id: I1ff5cecb5acc061ff6e59702fff5af8aba92523a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532757
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-04-22 14:32:12 +00:00
Herb Derby
c279e7640b add bilerp atlas support flag
Move the compile-time flag SK_EXPERIMENTAL_ADD_ATLAS_PADDING,
to a runtime flag in GrContextOptions.

Bug: chromium:1275890

Change-Id: I7e051cd4834ac44958b1431976535519e8bdaa3e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/482416
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-12-10 20:33:57 +00:00
Herb Derby
672062da97 generate fully transformed device bounds for clipping
The direct mask sub runs were only shifting the device bounds,
and never really transforming them. This adds code to do the full
bounds transform when the positionMatrix does not represent an
integer offset.

Add a meaningful clip to the slug GM to demonstrate change. With
the old code, the slugs did not respect the clip. Now they do.

Bug: chromium:1254726

Change-Id: I1f3ce2b5068ec5824e814ca9ac67c9aeae307187
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/479397
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-12-03 18:55:04 +00:00
Herb Derby
fa183572bf use correct size call for GM
Change-Id: Ic088fd5ac60c9218ce252cbbbf5dedbb3d62e503
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/478060
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-11-30 22:38:53 +00:00
Herb Derby
b755b0157e add clipping to slug test
Change-Id: I62d767bffb4e5c366ecbff5f8d39b547f93d6c00
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/478059
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-11-30 21:41:10 +00:00
Herb Derby
2c6b3deb42 only test slugs when padding is correct
The slug GM should only run if the experimental padding flag:
SK_EXPERIMENTAL_ADD_ATLAS_PADDING is defined.

Otherwise, there is just random pixel set based on atlas layout.

Change-Id: Ib5c2352b630d1ab4a24b5830ffcaa7f93666fd93
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/477757
Auto-Submit: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-11-30 16:37:58 +00:00
Herb Derby
25c0e1a8dd GrSlug prototype
A GrSlug encapsulates an SkTextBlob at a certain origin, using a
given paint. Once a blob is converted to a slug, it can be drawn
through a canvas and will obey the canvas's mapping and clipping.

The glyphs encoded as mask will be transformed using bi-linear
interpolation. The other glyphs type will draw as they normally
would. This allows drawing an SkTextBlob using the original
glyph data from the cache.

Bug: chromium:1254726

Change-Id: I1b42c94966d22865922ce991ae6ed13b51360618
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/471157
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-11-29 21:48:31 +00:00