Commit Graph

4472 Commits

Author SHA1 Message Date
Mike Reed
1f60733fb3 Revert "Revert "move onto new factories for SkMatrix""
This reverts commit c80ee456ad.

fix: update flutter's gn file to add guard

Change-Id: Iac5171c8475d9a862d06255dab1c6f38f10de2f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291361
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-05-21 16:58:39 +00:00
Mike Reed
c80ee456ad Revert "move onto new factories for SkMatrix"
This reverts commit 046c2b7d90.

Reason for revert: need to update/guard flutter

Original change's description:
> move onto new factories for SkMatrix
> 
> Just rename, no functional changes expected.
> 
> Change-Id: Id77ab1cf6b1cab35087a7c56000750912cf47383
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290831
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

TBR=fmalita@chromium.org,reed@google.com

Change-Id: Ic74f177128913374b8c60b4df88f04cf72fbacb3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291359
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-05-21 16:05:20 +00:00
Mike Reed
046c2b7d90 move onto new factories for SkMatrix
Just rename, no functional changes expected.

Change-Id: Id77ab1cf6b1cab35087a7c56000750912cf47383
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290831
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-05-21 15:04:09 +00:00
Mike Reed
9ded74e024 use strokeandfill patheffect, and fix it
Similar to our stroker, I try to detect when to reverse the fill.

Change-Id: I3099f009dd78dc6e4ffd295e13183c85e0990761
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291179
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-05-20 21:37:52 +00:00
Brian Salomon
287d5984fb Apply additional clipping in SkGpuBlurUtils.
Clip the input src bounds to reduce the amount of rescaling work

Avoid creating redundant columns in the y-pass of two pass blur.

Change-Id: Ib1a07334dce8ca941cce0be74657eda150591b63
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290823
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-05-20 15:47:16 +00:00
Mike Reed
3e84312c0f add new patheffect for stroke-and-fill
Change-Id: I2212e547d3d15c65c20f2f8e10fda5f2ef832187
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291041
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-05-20 15:01:26 +00:00
Mike Reed
d240d76b34 extract original paths at big size to improve precision
As part of this, start introducing more consistent factories (matching classes like SkM44)

Change-Id: I453f1856c0427b008faaed9dbba5263e53a48ce4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290766
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-05-19 17:27:22 +00:00
Brian Salomon
2a7eff96a8 Avoid MIP mapping in strict_constraint_no_red_allowed
Change-Id: Ia5fa3b7c61fb26abb9bcd2f21e1b9f01e77eb08e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290762
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-05-19 15:08:42 +00:00
Mike Reed
1963009cd0 stroke-and-fill is deprecated, introduce simpler api
baby step for https://skia-review.googlesource.com/c/skia/+/158020/

Bug: skia:8428
Change-Id: I0411c52a4fb97755e1b06b2aba8cb969776309bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290717
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-05-19 13:03:29 +00:00
Brian Salomon
ca76920e78 Split bleed GM into two: one tests kStrict and tests kFast.
This should make triaging easier since it should be more obvious whether
red pixels or just (filtered) black/white checkerboard is acceptable.
And make that plainly obvious in the GM name.

Change-Id: Ie56dd518f43f01bf6d671eddffcf41c06a039f02
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290639
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-05-19 12:53:49 +00:00
Mike Reed
98bc22c689 add fontmetrics to custom typeface
Change-Id: Ib6f468f6fd35b73e590d22a33d1322d3de48edb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290645
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-05-19 00:38:29 +00:00
John Stiles
dbcf680f8f Fix rendering of very-thin dashed lines when MSAA is enabled.
The previous code would increase the rendered stroke width to 1px (in
screen-space) to ensure proper subpixel coverage when the dashed line to
render was very thin. However, the MSAA path relies on hardware MSAA for
subpixel coverage. The stroke width is now left as-is when MSAA is on.

Additionally, this CL includes some minor polish to coverage-related
code that I made while hunting for the root cause of the bug.

Bug: skia:10240

Change-Id: I28df59a4e1da3661778acc7766cc8f75b15bc915
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290643
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-05-18 21:26:49 +00:00
Mike Reed
2ddf7f39de extend custom typeface gm
Change-Id: I472e009ed78e4652a56a3987af0c488a238908b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290638
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-05-18 18:45:38 +00:00
Florin Malita
839e70f17e Identity unichar <-> glyph_id mapping for SkCustomTypeface
Would be neat to support explicit mappings, but this is sufficient for
what I'm looking at now (allows passing custom tf + "strings" through
the existing shaping pipeline).

Change-Id: I62a8a0c90cc9f6bf3ede82932a8b6a2a933521c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290197
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-05-15 21:10:54 +00:00
Brian Salomon
11ad4ccfd4 Reland "Revert "Revert "Fix tile modes in SkGpuBlurUtils."""
This is a reland of e5865f6f10

Original change's description:
> Revert "Revert "Fix tile modes in SkGpuBlurUtils.""
> 
> This reverts commit 88d04cb51a.
> 
> Change-Id: I3ca403bb9631a273b5cbe2304c6c3ff9dd01fa89
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289625
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Change-Id: I93a0c1f635487f47b6bd13082ea456f025eac700
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290121
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-05-15 19:46:43 +00:00
Brian Salomon
6ef29333cb One bleed GM
The alpha versions are impossible to triage (the bleed is barely
perceptible). Image and bitmap no longer go through separate code
paths in SkGpuDevice so we don't need bitmap variants. Alpha image/
shader interaction is orthogonal to the rest of what's being tested
here and makes triaging even harder.

Change-Id: I85dffa01de0f4f06cb9cbe04fb1d039a8b61416a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290118
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-05-15 15:19:05 +00:00
Brian Osman
28590d54f5 Add 'shader' as an alias for 'fragmentProcessor'
Change-Id: I2d95c63de18125e6258709b48b03abd7904b7537
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278596
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-05-15 13:52:15 +00:00
Brian Salomon
364ed37bf1 Reland "Revert "Fix tile modes in SkGpuBlurUtils.""
This reverts commit e5865f6f10.

Reason for revert: some async GMs on some configs look like they are
reading from edges of approx textures.

Original change's description:
> Revert "Revert "Fix tile modes in SkGpuBlurUtils.""
> 
> This reverts commit 88d04cb51a.
> 
> Change-Id: I3ca403bb9631a273b5cbe2304c6c3ff9dd01fa89
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289625
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,michaelludwig@google.com

# Not skipping CQ checks because this is a reland.

Change-Id: If6f5917982b8c865161e7f4a566df49cb772989b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290036
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-05-15 00:55:26 +00:00
Florin Malita
340cd9c99e SkCustomTypeface tweaks
- don't require prior glyph count knowledge - grow dynamically

  - no need to store the glyph count explicitly, it's reflected in
    path/advance vector sizes

Change-Id: I3650ba9312db02c99b72bcf7fd3215697ec00b08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289893
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-05-14 21:44:24 +00:00
Greg Daniel
0a2464f51f Update internal skia uses to use flushAndSubmit and submit calls.
Bug: skia:10118
Change-Id: Ieb7c0eece56d3d9df56ecb52e00e76c01f038de8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289888
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-05-14 20:26:44 +00:00
Brian Salomon
e5865f6f10 Revert "Revert "Fix tile modes in SkGpuBlurUtils.""
This reverts commit 88d04cb51a.

Change-Id: I3ca403bb9631a273b5cbe2304c6c3ff9dd01fa89
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289625
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-05-14 20:24:44 +00:00
Michael Ludwig
c002d5619e Simplify GrClip::getConservativeBounds() signature
It turns out no one was using the intersection of rect functionality on
GrClip, and this helps simplify what the new clip stack needs to define.

Bug: skia:10205
Change-Id: If85a0c744dd68a8ad2f380b54a539ac74850e4ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289440
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-05-13 18:59:13 +00:00
Michael Ludwig
828d341199 Reland "Refactor stencil clip mask generation into helper"
This reverts commit de228e53fe.

Reason for revert: GrReducedClip now assumes context isn't abandoned,
windowrectangles GM abuses GrReducedClip and has to be abandon-aware.

Original change's description:
> Revert "Refactor stencil clip mask generation into helper"
>
> This reverts commit 8b3a8a5238.
>
> Reason for revert: GM assert failure
>
> Original change's description:
> > Refactor stencil clip mask generation into helper
> >
> > Change-Id: If3dc80efde3b44e87ba8e7af3a258896ec5e78e6
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288977
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Chris Dalton <csmartdalton@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,csmartdalton@google.com,michaelludwig@google.com
>
> Change-Id: I16559f791601145f57d147cdae345c200af313f1
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289237
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

# Not skipping CQ checks because this is a reland.

Change-Id: I6a9372edecd0bdc1a38464ab85f7b7f3ca85e5ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289239
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-05-12 17:49:47 +00:00
Adlai Holler
00ddb0029d Reland "Support large kernels on GPU in matrix convolution effect"
This reverts commit a117e7b75b.

Reason for revert: Fixed divide-by-0 in the unpremul logic. This was here before but never caused problems (or we ignored them.)

Original change's description:
> Revert "Reland "Support large kernels on GPU in matrix convolution effect""
>
> This reverts commit 76cb9c4d4c.
>
> Reason for revert: Tegra3 & Metal issues
>
> Original change's description:
> > Reland "Support large kernels on GPU in matrix convolution effect"
> >
> > This reverts commit 41e377d1ba.
> >
> > Reason for revert: fixed issues
> >
> > Bug: skia:8449
> > Change-Id: I0c4389f0efa92c6da69253b2304ad9a072750965
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287817
> > Commit-Queue: Adlai Holler <adlai@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com,adlai@google.com
>
> Change-Id: I5c3f04d4d262550a3298b8fd677c8a1661be7ad9
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:8449
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289076
> Reviewed-by: Adlai Holler <adlai@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com,adlai@google.com


Bug: skia:8449
Change-Id: I90b8e9e0eb52bc08308fb472eb216ed0bd4785a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289030
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-05-12 12:47:44 +00:00
Adlai Holler
a117e7b75b Revert "Reland "Support large kernels on GPU in matrix convolution effect""
This reverts commit 76cb9c4d4c.

Reason for revert: Tegra3 & Metal issues

Original change's description:
> Reland "Support large kernels on GPU in matrix convolution effect"
> 
> This reverts commit 41e377d1ba.
> 
> Reason for revert: fixed issues
> 
> Bug: skia:8449
> Change-Id: I0c4389f0efa92c6da69253b2304ad9a072750965
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287817
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com,adlai@google.com

Change-Id: I5c3f04d4d262550a3298b8fd677c8a1661be7ad9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8449
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289076
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-05-11 20:17:26 +00:00
Brian Salomon
518fd4d9d0 Reland "Another fix for dash line thickness."
This is a reland of bf1904fd48

Fix for case of scaling matrix and update GM to use a scaling
matrix.

Original change's description:
> Another fix for dash line thickness.
>
> Use the device space offset from the dash centerline for
> antialiasing in y direction.
>
> Bug: chromium:1049028
>
> Change-Id: Ib6363579680d05cbf1fe34795695422baeca7065
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288764
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: chromium:1049028
Change-Id: I6d2b04f9cf5de302c41045c2e2494cee43092d9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288976
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-05-11 18:58:01 +00:00
Adlai Holler
76cb9c4d4c Reland "Support large kernels on GPU in matrix convolution effect"
This reverts commit 41e377d1ba.

Reason for revert: fixed issues

Bug: skia:8449
Change-Id: I0c4389f0efa92c6da69253b2304ad9a072750965
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287817
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-05-11 15:40:09 +00:00
Brian Salomon
d7a5b59b1e Revert "Another fix for dash line thickness."
This reverts commit bf1904fd48.

Reason for revert: layout test needs update

Original change's description:
> Another fix for dash line thickness.
> 
> Use the device space offset from the dash centerline for
> antialiasing in y direction.
> 
> Bug: chromium:1049028
> 
> Change-Id: Ib6363579680d05cbf1fe34795695422baeca7065
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288764
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: chromium:1049028
Change-Id: Id2a9e737a757734af4e3e7db679eab0293a620b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288898
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-05-11 12:46:01 +00:00
Brian Salomon
bf1904fd48 Another fix for dash line thickness.
Use the device space offset from the dash centerline for
antialiasing in y direction.

Bug: chromium:1049028

Change-Id: Ib6363579680d05cbf1fe34795695422baeca7065
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288764
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-05-08 21:32:05 +00:00
Brian Salomon
c683912173 Improve thin horiz/vertical dashed lines by not forcing width to 1.
It looks like a bug slipped in quite a while back here:
https://codereview.chromium.org/1092793006/diff/30002/src/gpu/effects/GrDashingEffect.cpp

where a width snapping that was supposed to apply to non-AA lines was
changed to apply to AA lines.

Adds GM that tests < 1 pixel wide dashed horiz/vertical lines.

The lines look better with the change but are still a little too thick,
depending on the subpixel offset.

BUG: chromium:1049028

Change-Id: I45734f5ef55548b62c188d9f55d3150c00059eed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288628
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-05-08 16:25:20 +00:00
Mike Reed
b0210d208c Revert "Revert "custom typeface""
Fix: const auto [...] --> auto [...]

This reverts commit 0066adefa9.

Change-Id: I5d2df8bcc2bc681259a55b2b851d53fb18599287
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288550
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-05-07 22:52:56 +00:00
Brian Osman
c66cd987f7 Reland "Revert "custom typeface""
This reverts commit 61642b3366.

Reason for revert: ../../src/utils/SkCustomTypeface.cpp(179,20): error: cannot decompose this type; 'std::tuple_size<const SkPoint>::value' is not a valid integral constant expression

Original change's description:
> Revert "Revert "custom typeface""
> 
> Fix: implement onComputeBounds() and generateFontMetrics()
> 
> This reverts commit 0066adefa9.
> 
> Change-Id: Idb59336a3d201bb97e494ee0e0bb189e0a7186f1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288536
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

TBR=bungeman@google.com,reed@google.com

# Not skipping CQ checks because this is a reland.

Change-Id: I6845bb96a00a0c9ee54704a4c299556cc32e6438
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288557
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-05-07 18:46:16 +00:00
Mike Reed
61642b3366 Revert "Revert "custom typeface""
Fix: implement onComputeBounds() and generateFontMetrics()

This reverts commit 0066adefa9.

Change-Id: Idb59336a3d201bb97e494ee0e0bb189e0a7186f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288536
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-05-07 18:21:30 +00:00
Mike Reed
0066adefa9 Revert "custom typeface"
This reverts commit 3a79f33eca.

Reason for revert: MSAN issues

   Uninitialized value was stored to memory at
     #0 0x2cd74de in SkFontPriv::GetFontBounds(SkFont const&) /mnt/pd0/s/w/ir/cache/work/skia/out/Build-Debian10-Clang-x86_64-Release-MSAN/Release/../../../../../../skia/src/core/SkFont.cpp:400:34
     #1 0x31115ad in SkTextBlobBuilder::ConservativeRunBounds(SkTextBlob::RunRecord const&) /mnt/pd0/s/w/ir/cache/work/skia/out/Build-Debian10-Clang-x86_64-Release-MSAN/Release/../../../../../../skia/src/core/SkTextBlob.cpp:307:31
     #2 0x31104d2 in SkTextBlobBuilder::updateDeferredBounds() /mnt/pd0/s/w/ir/cache/work/skia/out/Build-Debian10-Clang-x86_64-Release-MSAN/Release/../../../../../../skia/src/core/SkTextBlob.cpp:374:47
     #3 0x31104d2 in SkTextBlobBuilder::make() /mnt/pd0/s/w/ir/cache/work/skia/out/Build-Debian10-Clang-x86_64-Release-MSAN/Release/../../../../../../skia/src/core/SkTextBlob.cpp:605:11
     #4 0x31175c1 in SkTextBlob::MakeFromText(void const*, unsigned long, SkFont const&, SkTextEncoding) /mnt/pd0/s/w/ir/cache/work/skia/out/Build-Debian10-Clang-x86_64-Release-MSAN/Release/../../../../../../skia/src/core/SkTextBlob.cpp:782:20
     #5 0x1920415 in UserFontGM::onOnceBeforeDraw() /mnt/pd0/s/w/ir/cache/work/skia/out/Build-Debian10-Clang-x86_64-Release-MSAN/Release/../../../../../../skia/gm/userfont.cpp:65:17


Original change's description:
> custom typeface
> 
> - only paths implemented at the moment
> 
> Seems if we want to serialize/deserialize these, we will need to
> register a factory with skia, so it can sniff the beginning of the
> font "file", to know how to recreate it.
> 
> Lots of follow-on things to explore:
> - do we need to even store/know advance widths?
> - should we also (optionally) support a CMAP? names? others?
> 
> Change-Id: If9fa99b7b8f6e265f06eb3ba2ca4fcb073275250
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287157
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=bungeman@google.com,fmalita@chromium.org,reed@google.com

Change-Id: Iee93db8d0f94d706f0b97566d2d15e2ad2407601
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288463
Reviewed-by: Mike Reed <reed@google.com>
2020-05-07 16:51:09 +00:00
Mike Reed
3a79f33eca custom typeface
- only paths implemented at the moment

Seems if we want to serialize/deserialize these, we will need to
register a factory with skia, so it can sniff the beginning of the
font "file", to know how to recreate it.

Lots of follow-on things to explore:
- do we need to even store/know advance widths?
- should we also (optionally) support a CMAP? names? others?

Change-Id: If9fa99b7b8f6e265f06eb3ba2ca4fcb073275250
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287157
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-05-07 15:50:16 +00:00
Brian Salomon
88d04cb51a Revert "Fix tile modes in SkGpuBlurUtils."
This reverts commit 9c4fa1e9cd.

Reason for revert: breaking things, maybe?

Original change's description:
> Fix tile modes in SkGpuBlurUtils.
> 
> Expand direct GM testing of SkGpuBlurUtils.
> 
> Decimate in SkGpuBlurUtils using GrSurfaceContext::rescale.
> GrSurfaceContext::rescale() works on recording context and
> uses approximate textures (to avoid memory issues for blurs
> of many different sizes).
> 
> Don't preserve contents to the top/left of the source bounds
> in the rescaled image.
> 
> GrGaussianConvolutionFragmentProcessor applies wrap mode to
> both axes.
> 
> Rely on GrTextureEffect to omit subset enforcement in shader
> by providing a domain rect rather than turning off tiling in
> caller.
> 
> Change-Id: I73e09b4fcbcbed590dd3599091c38d5de65f48c4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285099
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,michaelludwig@google.com

Change-Id: Ifdbfd9bdc67a082bf99e62371a7037e9544cf12a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288269
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-05-06 21:47:17 +00:00
Brian Salomon
9c4fa1e9cd Fix tile modes in SkGpuBlurUtils.
Expand direct GM testing of SkGpuBlurUtils.

Decimate in SkGpuBlurUtils using GrSurfaceContext::rescale.
GrSurfaceContext::rescale() works on recording context and
uses approximate textures (to avoid memory issues for blurs
of many different sizes).

Don't preserve contents to the top/left of the source bounds
in the rescaled image.

GrGaussianConvolutionFragmentProcessor applies wrap mode to
both axes.

Rely on GrTextureEffect to omit subset enforcement in shader
by providing a domain rect rather than turning off tiling in
caller.

Change-Id: I73e09b4fcbcbed590dd3599091c38d5de65f48c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285099
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-05-06 19:44:35 +00:00
Mike Reed
52653731d5 remove unused maskfilter helpers: Combine, Compose
Change-Id: I8c6bf2c3539905c9c7bc9c29454322dbf944fe96
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287823
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-05-05 19:10:00 +00:00
Robert Phillips
3d311a983b Switch some GMs over to using create_portable_typeface
This is in response to some Win7 vs Win10 font selection diffs on the compositor_quads_filter GM.

Change-Id: I9564d8a305b0bf773ddb31597b29878e0bc3323d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287796
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-05-05 13:59:48 +00:00
Brian Salomon
41e377d1ba Revert "Support large kernels on GPU in matrix convolution effect"
This reverts commit 1ed4391fe7.

Reason for revert: Looks like some bad images showed up at gold.skia.org and that the ProcessorCloneTest is crashing on Windows bots:
https://logs.chromium.org/logs/skia/4bfabe0bad476911/+/steps/dm/0/stdout

Original change's description:
> Support large kernels on GPU in matrix convolution effect
> 
> Currently matrix convolution falls back to CPU execution for large kernels, due to the argument limit for fragment shaders.
> 
> Now for large kernels, we store them in a texture and sample them in a shader to sidestep the limit.
> 
> Change-Id: Icc069a701ea8e9cd0adf75f4bfd149fd22e31afd
> Bug: skia:8449
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263495
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>

TBR=robertphillips@google.com,michaelludwig@google.com,adlai@google.com

Change-Id: Iaf4858131046a343481bcf0fd9cc3919d9fc2bda
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8449
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287736
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-05-05 01:28:11 +00:00
Adlai Holler
1ed4391fe7 Support large kernels on GPU in matrix convolution effect
Currently matrix convolution falls back to CPU execution for large kernels, due to the argument limit for fragment shaders.

Now for large kernels, we store them in a texture and sample them in a shader to sidestep the limit.

Change-Id: Icc069a701ea8e9cd0adf75f4bfd149fd22e31afd
Bug: skia:8449
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263495
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-05-04 19:26:48 +00:00
Brian Salomon
f686fa9af9 Make backdrop_hintrect_clipping GM use kClamp tile mode
Change-Id: Ic9d9200a7c1346d0e6bd70029331f9213db5e374
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287380
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-05-04 15:25:19 +00:00
Ben Wagner
c19459bf1e Don't trust glyph runs in XPS.
In XPS if a glyph is out of range, ignore it. Also resolve the default
font in the new way, removing the last user of SkTypefacePriv.

In PDF handle fonts with zero glyphs correctly.

Rewrite SkBitSet to keep track of its size, move properly, and make it
more obvious when certain checks are actually made instead of relying on
undefined behavior.

Add a test in a GM to ensure we don't draw anything when a glyph is
out of range on all backends.

Fix the DirectWrite SkScalerContext to pass this new test for
consistency.

Bug: chromium:1071311
Change-Id: I2583970bf1425f59d0d64e3dd7d28109991f9ea9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286776
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-05-01 22:17:17 +00:00
Xianzhu Wang
a91e478ceb Restore SkCanvas::kPreserveLCDText_SaveLayerFlag
Will use this in Chrome to support LCDText in saveLayer/restore with
opacity.

This partly reverts https://skia-review.googlesource.com/c/skia/+/181841.

Bug: 1076019
Change-Id: Id870fb1dcc95c9b319797e936725b4447a97d1d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285956
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Auto-Submit: Xianzhu Wang <wangxianzhu@chromium.org>
2020-05-01 20:33:04 +00:00
Brian Osman
b32d66b296 Add layout(srgb_unpremul) to SkSL
For 3 and 4 channel float uniforms, this states that the data supplied
is unpremul sRGB, and transforms that data to the destination color
space (still unpremul) automatically.

Change-Id: I1b420d2fd10640963fa8e6736af3747cfc6e7d5b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286656
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-05-01 20:12:43 +00:00
Mike Klein
45be07785d length()
- add length() as a special intrinsic
 - style refactoring I wrote to help debug the CL
 - impl dup2,3,4 in program_fn
 - (better) fix dup2,3,4 in byte code interpreter

Change-Id: I7cd94a4bc03efc6af2053e9e6ae18b4da94363ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286896
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-05-01 20:07:40 +00:00
Mike Reed
8520e76f05 migrate spiral demo from canvaskit
- add atan, fract, dividef, subtractf

Also wants mix(), but I'm still learning how to handle 2 args
functions (e.g. how to support atan(y,x) as well)

Change-Id: Ib9f233cd1c4266110cfea68a7d444f834f875f1f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286276
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-04-30 16:52:22 +00:00
Robert Phillips
9a30ee09b0 Add BGR_10A2 support to Ganesh (take 2)
This is no different from the first try but a Chrome-side bug fix has landed:

https://chromium-review.googlesource.com/c/chromium/src/+/2173388 (Map RGBA/BGRA_1010102 to their correct SkColorType equivalents)

TBR=bsalomon@google.com
Bug: 1068416
Change-Id: Ic6ee758b0f0537d83262b0d708f9b7b15a4cb1c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286036
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-04-30 15:25:20 +00:00
Brian Salomon
702c5a3f42 Start on GM to directly test SkGpuBlurUtils
Bug: skia:10188

Change-Id: I29a8efe448532fecc2f7424622cd33afeee3287b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285876
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-04-29 16:50:56 +00:00
Robert Phillips
a50ce3c983 Revert "Add BGR_10A2 support to Ganesh"
This reverts commit 44fc53b7f5.

Reason for revert: Test to see if this is causing the linux-rel MediaColorTest.Yuv420pHighBitDepth failure on the Chrome roll

Original change's description:
> Add BGR_10A2 support to Ganesh
> 
> Bug: 1068416
> Change-Id: I40aa84b7f3f770ba550b7bea44c10173ae9a7ddf
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285356
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,robertphillips@google.com

Change-Id: I0ad0197ebd8de9b8761f84ba808c9f90891b9238
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1068416
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285958
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-04-28 22:30:46 +00:00