Commit Graph

5139 Commits

Author SHA1 Message Date
Ravi Mistry
e5be65e998 Update references to master branch
Change-Id: I1bfd1b655af6cdfbd64452b1e594a276425095fe
Bug: skia:11987
Docs-Preview: https://skia.org/?cl=410790
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/410790
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2021-05-21 15:18:16 +00:00
Adlai Holler
9604eab2bd 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>
2021-05-21 14:46:56 +00:00
Chris Dalton
ea46fb7d20 Disable CCPR everywhere except testing
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>
2021-05-20 16:52:15 +00:00
Ravi Mistry
850e4b5de1 Fix linkedin pageset for RecreateSKPs bot
Change-Id: I3bb2c63e0e90b36fc784a7db3512719ffeb099a8
Bug: skia:12019
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/410258
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-05-19 17:37:28 +00:00
Corentin Wallez
19f8f27282 Fix usage of deprecated wgpu::TextureUsage::OutputAttachment
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>
2021-05-17 14:42:30 +00:00
Brian Salomon
33ec611316 viewer can show offscreen layers in MSKPSlide
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>
2021-05-12 19:49:03 +00:00
Brian Osman
a5842bc903 Move SkSpan to include/, for use in public API
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>
2021-05-12 13:19:32 +00:00
Brian Osman
ae87bf1e49 Remove SkSpan class template deduction guides
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>
2021-05-11 20:06:29 +00:00
Brian Salomon
96263aa7c6 Reuse GL enums for ANGLE vendor/renderer
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>
2021-05-10 13:38:30 +00:00
Brian Salomon
1989342920 Consolidate gathering of info from GL strings.
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>
2021-05-07 13:20:18 +00:00
Michael Ludwig
97f85bb7fd Remove SkTextBlobDiffCanvas, use tracking device directly with base SkCanvas
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>
2021-05-06 16:11:57 +00:00
Brian Osman
c9125aa8f3 Reland "Better first-class shader & color filter support in runtime effects"
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>
2021-05-05 22:06:46 +00:00
Greg Daniel
c2cca5a8a0 Revert "Better first-class shader & color filter support in runtime effects"
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>
2021-05-04 13:36:26 +00:00
Brian Osman
adadb95a9f 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>
2021-05-04 01:29:57 +00:00
Brian Salomon
31fddc3769 MSKP support in nanobench
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>
2021-04-30 20:04:08 +00:00
Brian Salomon
8e880af78e Choose background color and whether to draw mskp bounds in viewer
Default the background color to transparent black, which is correct for
mskps captures from Android framework.

Bug: skia:11900
Change-Id: I97cab04993c0f85259e831f3d0c44f9b962365af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403077
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-30 19:33:49 +00:00
Brian Salomon
5276ba274b Add --reducedshaders to fm
Sometimes I like to dump the shaders from reduced shader mode.

Bug: skia:11844
Change-Id: I33c986116e326a023c432d582e3653267f311bca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402999
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2021-04-30 16:04:08 +00:00
Brian Salomon
0bc48228ae Reland "FPS and frame control for MSKP slide."
This is a reland of 3b7587814d

Use SkTPin instead of std::clamp (C++17 library feature).

Original change's description:
> FPS and frame control for MSKP slide.
>
> Bug: skia:11900
> Change-Id: Ib4d8da6a86da7966e613de2d7cfd61ff545b296a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400676
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>

Bug: skia:11900
Change-Id: I29d3f6a717bbdd4e1fee3322e98d33e51a28f264
Cq-Include-Trybots: luci.skia.skia.primary:Housekeeper-PerCommit-CreateDockerImage_Skia_Release
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402917
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-30 13:15:33 +00:00
Joe Gregorio
a9d3cfbda2 Revert "FPS and frame control for MSKP slide."
This reverts commit 3b7587814d.

Reason for revert: Failing on Housekeeper-PerCommit-CreateDockerImage_Skia_Release:

obj/tools/viewer/viewer.MSKPSlide.o
../../tools/viewer/MSKPSlide.cpp:64:23: error: no member named 'clamp' in namespace 'std'

        fFrame = std::clamp(fFrame, 0, fPlayer->numFrames() - 1);


Original change's description:
> FPS and frame control for MSKP slide.
>
> Bug: skia:11900
> Change-Id: Ib4d8da6a86da7966e613de2d7cfd61ff545b296a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400676
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>

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

Change-Id: I4a97deb1ac441f223977d2dbad2f93f5d4376a23
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11900
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402777
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2021-04-29 22:09:22 +00:00
Brian Salomon
3b7587814d FPS and frame control for MSKP slide.
Bug: skia:11900
Change-Id: Ib4d8da6a86da7966e613de2d7cfd61ff545b296a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400676
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-04-29 21:05:58 +00:00
Brian Salomon
06c9e2962b Revert "Revert "Add mskp player, use in viewer slide""
This reverts commit 0d174586c4.

Use SkTLazy instead of std::optional (C++17 library feature)

Bug: skia:11900
Change-Id: Ia41caa9322d812f9ba6644dd14ede7d0015cf8b3
Cq-Include-Trybots: luci.skia.skia.primary:Housekeeper-PerCommit-CreateDockerImage_Skia_Release,Build-Debian10-Clang-x86_64-Release-CMake
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402642
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-29 19:40:08 +00:00
Brian Salomon
0d174586c4 Revert "Add mskp player, use in viewer slide"
This reverts commit 9230fc59b7.

Reason for revert: broke something in housekeeping docker build.

Original change's description:
> Add mskp player, use in viewer slide
>
> viewer now takes --mskps <dir> and will have a slide per mskp and
> overview slide (just like --skps).
>
> Player uses offscreen surfaces to draw offscreen layers, allows
> random access to mskp frames.
>
> slide just plays mskp at fixed frame rate (for now).
>
> Bug: skia:11900
> Change-Id: I66104ffe88f5df721a1a835570acc3e4c23c3f07
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400537
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>

TBR=jvanverth@google.com,bsalomon@google.com,nifong@google.com

Change-Id: I97fb7a64d5ef2ca14dba1cf9e2ba91ab0e9d0018
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11900
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402639
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-29 17:15:58 +00:00
Brian Salomon
9230fc59b7 Add mskp player, use in viewer slide
viewer now takes --mskps <dir> and will have a slide per mskp and
overview slide (just like --skps).

Player uses offscreen surfaces to draw offscreen layers, allows
random access to mskp frames.

slide just plays mskp at fixed frame rate (for now).

Bug: skia:11900
Change-Id: I66104ffe88f5df721a1a835570acc3e4c23c3f07
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400537
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-04-29 16:35:07 +00:00
Mike Reed
b2497ddd0e Revert "Revert "onMatchFaceStyle is unused, so remove it""
This relands the idea that onMatchFaceStyle is no longer used, but
leaves the baseclass virtual to stage removing it from client
subclasses.

This reverts commit 3c04a65508.

Change-Id: I18570065249c86f7f155c28288dce3ea9d59f619
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401759
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-04-27 16:40:29 +00:00
Mike Reed
3c04a65508 Revert "onMatchFaceStyle is unused, so remove it"
This reverts commit 40f2985ec8.

Reason for revert: flutter has subclasses

Original change's description:
> onMatchFaceStyle is unused, so remove it
>
> Change-Id: I2b249d226af1c222edea6ec5f8de0b4d2542e34a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401676
> Auto-Submit: Mike Reed <reed@google.com>
> Reviewed-by: Julia Lavrova <jlavrova@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: I455b3f177570cc757442b772edbf969b9544e019
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401757
Reviewed-by: Mike Reed <reed@google.com>
2021-04-27 15:34:30 +00:00
Mike Reed
40f2985ec8 onMatchFaceStyle is unused, so remove it
Change-Id: I2b249d226af1c222edea6ec5f8de0b4d2542e34a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401676
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-04-27 14:45:12 +00:00
Ravi Mistry
5d8a09ebff Add wait time to ebay pageset
Bug: skia:11898
Change-Id: I0bb58f1d8e9c6ad48148d50b840f152fc158f071
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400538
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2021-04-24 15:17:04 +00:00
Chris Dalton
57ab06c14e Delete mixed samples
Mixed samples is no longer relevant for Ganesh. DMSAA and the new
Ganesh architecture both rely on full MSAA, and any platform where
mixed samples is supported will ultimately not use the old
architecture.

Change-Id: I5acc745010e090ef26310d92ec6240be2cd494cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399837
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-04-22 20:11:34 +00:00
Adlai Holler
d37a085cd0 Enable DAG reordering on almost all bots
We exclude the NUC5PPYH just to get desktop coverage,
and we exclude the Pixel4, 4XL, 5 because of an apparent driver
bug I'm in the progress of tracking down.

Bug: skia:10877
Change-Id: Ic925cc7434c5228bcc2ee07ae752f89229db55c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399742
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-04-22 16:55:39 +00:00
Chris Dalton
94df572a13 Convert dmsaa to an SkSurfaceProp
Bug: skia:11396
Change-Id: I1c2a72d80679df1c11529d05cbe781f6dfae6a79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396810
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-04-20 16:24:56 +00:00
Adlai Holler
4d92e41839 Revert "Enable DAG reordering on all bots except one"
This reverts commit b8e02c5f38.

Reason for revert: Broke Pixel5 glesmsaa4 desk_mapsvg.skp

Original change's description:
> Enable DAG reordering on all bots except one
>
> Before this CL, only select bots used reordering. After this CL,
> all bots except the NUC5PPYH use the flag.
>
> Once all our clients are migrated, we'll remove the flag altogether.
>
> Bug: skia:10877
> Change-Id: Iee734f8b99ae9eba6c1947009d8164032594b051
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398219
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Ravi Mistry <rmistry@google.com>

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

Change-Id: Iadf4f779bbaa1c5406d5f88e448994951ae89ae4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10877
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398179
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-04-20 15:48:07 +00:00
Adlai Holler
b8e02c5f38 Enable DAG reordering on all bots except one
Before this CL, only select bots used reordering. After this CL,
all bots except the NUC5PPYH use the flag.

Once all our clients are migrated, we'll remove the flag altogether.

Bug: skia:10877
Change-Id: Iee734f8b99ae9eba6c1947009d8164032594b051
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398219
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2021-04-20 14:19:35 +00:00
Ben Wagner
f6cc85844f Reland "Fix sk_app macOS raster window build conditions."
The "raster" window on macOS and iOS is actually backed by GL. Fix the
build rules and code conditions to reflect this. This allows for some
sk_app applications to run on macOS and iOS with skia_use_gl=false.

> Revert:
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397737
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

> Land:
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397256
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Change-Id: Ia8a421f4818856dd90cb4847095eee0d1836d1e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398056
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-04-19 18:25:44 +00:00
Adlai Holler
53a65b2b6f Reduce VRAM budget on one perf bot
This will let us see the reordered_dags_over_budget stat
in perf so that we know our fallback code path is getting tested.

Bug: skia:10877
Change-Id: I073c8622ddb8f3449511193bac045bfebc4e277c
Cq-Include-Trybots: luci.skia.skia.primary:Perf-Debian10-Clang-NUC7i5BNK-GPU-IntelIris640-x86_64-Release-All
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398217
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
2021-04-19 16:04:34 +00:00
Brian Osman
9d4741370c Revert "Fix sk_app macOS raster window build conditions."
This reverts commit 163ba10dde.

Reason for revert: Mac linker errors

Original change's description:
> Fix sk_app macOS raster window build conditions.
>
> The "raster" window on macOS is actually backed by GL. Fix the build
> rules and code conditions to reflect this. This allows for some sk_app
> applications to run on macOS with skia_use_gl=false.
>
> Change-Id: I5d7b37c4172079e163690faa4e55a622a6d4f844
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397256
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: Ie5fa24138e4387784c21559f28528a4c4d335626
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397737
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-17 17:41:27 +00:00
Ben Wagner
163ba10dde Fix sk_app macOS raster window build conditions.
The "raster" window on macOS is actually backed by GL. Fix the build
rules and code conditions to reflect this. This allows for some sk_app
applications to run on macOS with skia_use_gl=false.

Change-Id: I5d7b37c4172079e163690faa4e55a622a6d4f844
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397256
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-17 15:18:05 +00:00
Jim Van Verth
b5ea786dbd Viewer: apply same transform as slide to dimensions display.
Change-Id: Ic5192b072c98617dee85f28f8f4214c7a805a1fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397318
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-04-16 19:24:23 +00:00
John Stiles
f35853a4a2 Clarify output from rewrite_includes assertion.
Previously, the conflicting header names were printed between several
lines of "boilerplate" text, and without any explanatory text. This
made them difficult to notice. The assertion now has an explanatory
message and prints the conflicting filenames directly at the point of
the assertion.

Before:
---
Running presubmit upload checks ...
tests/sksl/dslfp GrSwizzle.h /Users/johnstiles/skia/src/gpu/GrSwizzle.h
Traceback (most recent call last):
  File "tools/rewrite_includes.py", line 60, in <module>
    assert file_name not in headers
AssertionError

** Presubmit ERRORS ** (etc)
username$ _

After:
---
Running presubmit upload checks ...
Traceback (most recent call last):
  File "tools/rewrite_includes.py", line 61, in <module>
    assert file_name not in headers, message
AssertionError: Header filename is used more than once!
- tests/sksl/dslfp/GrSwizzle.h
- /Users/johnstiles/skia/src/gpu/GrSwizzle.h

** Presubmit ERRORS ** (etc)
username$ _

Change-Id: I2b6848ef82c4b1c6d4b5577a76969785e5e122bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397149
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-04-15 19:44:32 +00:00
Herb Derby
0b1228d53e put an arena on GrRenderTargetProxy
This is a reland of 5a2de5e72f

This is part one of two CLs. In this CL, I put a
sk_sp<GrArenas> on GrRenderTargetProxy where GrArenas wraps
a SkArenaAlloc to add ref counting. Creating
a GrOpsTask shares the GrArenas with the ops task. When an
GrOpsTask is destroyed, it nulls out the fArenas sk_sp on
the GrRenderTargetProxy to limit the life span of the arenas.

New plumbing was added to GR_DRAW_OP_TEST_DEFINE to allow a
proper GrSurfaceDrawContext to be passed to GrAtlasTextOp's
GR_DRAW_OP_TEST_DEFINE so the arena will have a proper lifetime.

The second CL will work on replacing GrOpsTask's fAllocators
system with the shared arena.

Change-Id: Ieb568e4533c17e31b3b015e7781365d7d898c483
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396818
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-04-15 14:37:59 +00:00
Brian Osman
cbb60bd0b0 Add runtime color filter and shader modes to the SkSL compiler
These enforce stricter rules about the signature of main, and each one
uses a separate pre-include module. That prevents color filters from
being able to reference sk_FragCoord (or coords passed to main) at all.
It also limits the versions of sample() that are exposed.

In the new world, an effect created for a specific stage of the Skia
pipeline can only be used to create instances of that stage (SkShader or
SkColorFilter). For now, SkRuntimeEffect::Make uses kRuntimeEffect,
which continues to be more lenient and allow creation of either shaders
or color filters from a single effect. After we migrate all clients, we
can deprecate and then delete that mode.

Bug: skia:11813
Change-Id: I0afd79a72beeec84da42c86146e8fcd8d0e4c09f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395716
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-15 13:30:59 +00:00
Brian Salomon
5a32828e5e No VS specialization for identity or scale/trans in reduced shader mode
Modifies helpers on GrGLSLGeometryProcessor that insert, set, and make
keys for view/local matrix uniforms to not omit the uniform when
the matrix is identity or use a float4 when it is scale/trans. Always
uses a 3x3.

Bug: skia:11844
Change-Id: I0f25b60b46b8932d7e2cac4a50159d22b9cd84d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395656
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-14 20:09:09 +00:00
Adlai Holler
8e2a8b202c Surface resource cache through cmdline flag
This lets us test out the memory-fallback code in the new
ops task reordering pathway on our bots.

Bug: skia:10877
Change-Id: Ic5662ef68e46b144eb2821687390c858d0056ba1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396157
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-04-14 18:49:48 +00:00
John Stiles
3738ef531b Move code generators to codegen/ directory.
We are up to having seven distinct types of codegen, and will soon have
an 8th (DSL C++).

Change-Id: I6758328390c234ba1d5c30c118199dbc820af52a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395817
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-04-13 15:34:24 +00:00
John Stiles
f2c2d3020e Migrate PersistentCacheUtils logic into a cpp file.
This code is not performance-sensitive, and there doesn't seem to be any
benefit to making it header-only.

Change-Id: Ic83be5cbb96f08c18a144954be7453aaabaa5a72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394900
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-12 14:09:59 +00:00
Brian Salomon
91216d5b65 Add "reduced shader" testing mode.
Currently doesn't do anything other than add new configs that set
a GrContextOption that becomes available in GrCaps. Runs new configs
on Perf/Test bots (MTL/iPhone11 and GL/Ubuntu).

Bug: skia:11844
Change-Id: I58586cae0980e52701abd1633dbc79b381f6015b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394996
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-09 20:15:37 +00:00
Mike Klein
a12796b42c fix git-sync-deps
We really do use this.

Change-Id: I0defcf8aa3b23eec89b38b6720228daa8d50c27b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394956
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2021-04-09 15:52:57 +00:00
Herb Derby
27ce7df013 Revert "put an arena on GrSurfaceDrawContext"
This reverts commit 5a2de5e72f.

Reason for revert: Upon further investigation this still leaks

Original change's description:
> put an arena on GrSurfaceDrawContext
>
> This is part one of two CLs. In this CL, I put a
> sk_sp<GrArenas> on GrSurfaceFillContext where GrArenas wraps
> a SkArenaAlloc to add ref counting. Creating
> a GrOpsTask shares the GrArenas with the ops task. New plumbing
> was added to GR_DRAW_OP_TEST_DEFINE to allow a proper
> GrSurfaceDrawContext to be passed to GrAtlasTextOp's
> GR_DRAW_OP_TEST_DEFINE so the arena will have a proper lifetime.
>
> The second CL will work on replacing GrOpsTask's fAllocators
> system with the shared arena.
>
> Change-Id: Ife3be0ab265441cbffab360f2808f5eed86db8b3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392936
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

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

Change-Id: I9ca5c8b1e16b468003788cd3126eda1d40ff93ed
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393177
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-04-06 20:16:08 +00:00
Ravi Mistry
3e1dd8df28 Fix crashing skia_wikipedia_mobile.py
Bug: skia:11839
Change-Id: I3aa1c7d36e61a6a6c40ae10e9463f94d83f45790
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393137
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2021-04-06 18:17:39 +00:00
Ravi Mistry
826b653926 Specify wait time for new motionmark SKPs to prevent timeouts
Bug: skia:11817
Change-Id: I395a565b3df2f7745891e182b390f938df8623fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393136
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2021-04-06 18:15:16 +00:00
Herb Derby
5a2de5e72f put an arena on GrSurfaceDrawContext
This is part one of two CLs. In this CL, I put a
sk_sp<GrArenas> on GrSurfaceFillContext where GrArenas wraps
a SkArenaAlloc to add ref counting. Creating
a GrOpsTask shares the GrArenas with the ops task. New plumbing
was added to GR_DRAW_OP_TEST_DEFINE to allow a proper
GrSurfaceDrawContext to be passed to GrAtlasTextOp's
GR_DRAW_OP_TEST_DEFINE so the arena will have a proper lifetime.

The second CL will work on replacing GrOpsTask's fAllocators
system with the shared arena.

Change-Id: Ife3be0ab265441cbffab360f2808f5eed86db8b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392936
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-04-06 15:15:46 +00:00
Mike Klein
3144a1e698 have fm mkdir -p
This allows directories in sources, e.g.

    $ fm -b cpu -s skimage/dm/01_original.jpg -w foo
        skimage/dm/01_original.jpg  f181c4655d0f55d7000dd04a4d28d407      330ms

    $ find foo
        foo
        foo/skimage
        foo/skimage/dm
        foo/skimage/dm/01_original.jpg.png

where previously,

    $ fm -b cpu -s skimage/dm/01_original.jpg -w foo
        sk_fopen: fopen("foo/skimage/dm/01_original.jpg.png", "wb") returned nullptr
        (errno:2): No such file or directory
        libpng error: HashAndEncode::encodePNG() failed writing stream

        Signal 6:
        _sigtramp (+0x1d)

Change-Id: I6950d77cacba16363315fb8d5c6d866d207c9a25
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392198
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-04-02 20:35:35 +00:00
Brian Salomon
2c673409ef Expose writing to mip levels via GrSurfaceContext::writePixels
Bug: skia:11786
Change-Id: Id17952db0aede56fa39845d9d371cf0a141f9dd7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391836
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-04-02 19:16:15 +00:00
Brian Osman
d18967c67d Add integer uniforms to runtime effects
Bug: skia:11803
Change-Id: I925f14be282b96355721986de6049090b35adf3d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391856
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2021-04-01 17:20:03 +00:00
Ravi Mistry
7724291b6e Add new motionmark SKPs
Bug: skia:11817
Change-Id: Ibd940ffa904171e43377b0852375d835e59bc230
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391076
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2021-03-31 16:37:02 +00:00
Ravi Mistry
f29c646ccf Replace desk_intelwiki.skp with desk_gujuratiwiki.skp
Bug: skia:11819
Change-Id: I504a58f5d1da51cf715b73efef44d00c0edef5e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391196
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-03-31 16:36:37 +00:00
Brian Salomon
5392c94fe8 GrConvertPixels takes pixmaps
Add GrCPixmap, a GrPixmap but with const void* instead of void*. Share
impl via template base class GrPixmapBase.

Change-Id: I7dfdf24a73c1bc8557ff7b90f93a9399da2f3f75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350022
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-03-31 00:23:17 +00:00
John Stiles
2ee4d7a7f5 Rework optimization override flags.
Previously, the Compiler optimization overrides only supported force-
disabling a particular behavior; we assumed that the default state of
a Compiler was to allow all optimizations. This assumption is about to
be invalidated, as the Inliner will soon be off by default unless you
are using GLES.

The override flags are now a tri-state; optimization and inlining can
be set to "default", "on" or "off".

Change-Id: I5637693222ca1de74ca1073c24d86c8e7c5026f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390136
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>
2021-03-30 15:39:15 +00:00
Robert Phillips
0d8722c8b5 Make use of shareable promise images in tools
The main change here is just fusing the following three methods into recreateSKP:
   deflateSKP
   createCallbackContexts
   createSKP

All the remaining changes are just API fallout from that.

Bug: skia:11728
Change-Id: Iae2ce65983ad56c8288bdc830e248394a0055bfb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389925
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-03-30 14:25:55 +00:00
Ravi Mistry
430fd53936 Add scrolling to go to the more interesting parts of desk_intelwiki.skp
Bug: skia:11804
Change-Id: I96ce34311b5e5420ee343a0dbc68ef20f399be4f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390336
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-03-30 13:46:19 +00:00
Ravi Mistry
9340b43508 Remove anchor and increase wait time for desk_intelwiki.skp
No-Try: true
Bug: skia:11804
Change-Id: Ib30df7f233bd3c2bcbfdf5c62e803be187a4ff01
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389712
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-03-29 15:14:22 +00:00
Eric Boren
a1db799824 Fix Python3 compatibility
Bug: skia:11768
Change-Id: I6107362457dce380e3fb1647ad58d8e33e453e2d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388743
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2021-03-25 14:15:35 +00:00
John Stiles
15da98ce58 Revert "Performance experiment: Disable SkSL inliner in nanobench/skpbench."
This reverts commit 3f5bee1a7a.

Reason for revert: concluding experiment

Original change's description:
> Performance experiment: Disable SkSL inliner in nanobench/skpbench.
>
> This is a reland of 045d7513d7
>
> This will allow us to measure the impact (positive or negative) of
> inlining functions before submitting a shader to the driver.
> In previous trials, we encountered an issue with overloads of cross()
> which prevented us from collecting data on some platforms.
>
> Original change's description:
> > Performance experiment: Disable SkSL inliner in nanobench/skpbench.
> >
> > This is a reland of 3f35ac10b4
> >
> > Time to run this experiment again.
> >
> > Original change's description:
> > > Performance experiment: Disable SkSL inliner in nanobench/skpbench.
> > >
> > > This will allow us to measure the impact (positive or negative) of
> > > inlining functions before submitting a shader to the driver.
> > >
> > > Change-Id: Icbd64096445a353187b30feea68573d89ca18664
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384317
> > > Reviewed-by: Brian Osman <brianosman@google.com>
> > > Commit-Queue: John Stiles <johnstiles@google.com>
> >
> > Change-Id: I278a770d4129f4ad0bf867c33a01b49a88cea588
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/387256
> > Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> > Commit-Queue: John Stiles <johnstiles@google.com>
>
> Change-Id: I49a1555bde93c339fda567fc85a85e937af95628
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388396
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: Ifd63edeb06fea8eea4ac0a4242c93449b288b074
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388796
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-03-24 19:21:25 +00:00
John Stiles
3f5bee1a7a Performance experiment: Disable SkSL inliner in nanobench/skpbench.
This is a reland of 045d7513d7

This will allow us to measure the impact (positive or negative) of
inlining functions before submitting a shader to the driver.
In previous trials, we encountered an issue with overloads of cross()
which prevented us from collecting data on some platforms.

Original change's description:
> Performance experiment: Disable SkSL inliner in nanobench/skpbench.
>
> This is a reland of 3f35ac10b4
>
> Time to run this experiment again.
>
> Original change's description:
> > Performance experiment: Disable SkSL inliner in nanobench/skpbench.
> >
> > This will allow us to measure the impact (positive or negative) of
> > inlining functions before submitting a shader to the driver.
> >
> > Change-Id: Icbd64096445a353187b30feea68573d89ca18664
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384317
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: John Stiles <johnstiles@google.com>
>
> Change-Id: I278a770d4129f4ad0bf867c33a01b49a88cea588
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/387256
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

Change-Id: I49a1555bde93c339fda567fc85a85e937af95628
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388396
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-03-24 13:24:50 +00:00
Robert Phillips
84fd1c2dec Clean up remaining NVPR bits & bobs
Bug: skia:11760, skia:11787
Change-Id: Idfedb90576e0484bf32a9002081c0fcb888141eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388216
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-03-23 19:12:12 +00:00
Robert Phillips
f10535f6fa Fuse GrGLSLPrimitiveProcessor and GrGLSLGeometryProcessor ...
into a new GrGLSLGeometryProcessor. Since NVPR is no more this
distinction (between GLSL- Primitive and Geometry -Processor)
probably isn't needed/useful.

Bug: skia:11760
Change-Id: I75621725bd2b0ef3dbac2ea6449bd571551babab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388036
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-03-23 14:30:18 +00:00
Robert Phillips
787fd9d80a Fuse GrPrimitiveProcessor & GrGeometryProcessor into a new GrGeometryProcessor
With the removal of NVPR we no longer need this distinction.

Bug: skia:11760
Change-Id: I225a4feb764395fb72aca3ffc8b6d05396bf0b1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386890
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-03-22 19:44:40 +00:00
Robert Phillips
43e3dc994e Remove NVPR entry points from Skia's GL interface
This is blocked on the Chrome-side CL:

https://chromium-review.googlesource.com/c/chromium/src/+/2774573 (Remove setting of NVPR entries on Skia's GL interface)

Bug: skia:11760
Change-Id: I1788de07d8f0208e15356a147005b87110dfeab5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/387096
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-03-22 17:44:16 +00:00
John Stiles
1a4fae1a5f Revert "Performance experiment: Disable SkSL inliner in nanobench/skpbench."
This reverts commit 045d7513d7.

Reason for revert: experiment complete

Original change's description:
> Performance experiment: Disable SkSL inliner in nanobench/skpbench.
>
> This is a reland of 3f35ac10b4
>
> Time to run this experiment again.
>
> Original change's description:
> > Performance experiment: Disable SkSL inliner in nanobench/skpbench.
> >
> > This will allow us to measure the impact (positive or negative) of
> > inlining functions before submitting a shader to the driver.
> >
> > Change-Id: Icbd64096445a353187b30feea68573d89ca18664
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384317
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: John Stiles <johnstiles@google.com>
>
> Change-Id: I278a770d4129f4ad0bf867c33a01b49a88cea588
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/387256
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: I54d417e65bd134dee72ff46e9331f8fabfc724df
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/387536
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-03-21 14:30:49 +00:00
John Stiles
045d7513d7 Performance experiment: Disable SkSL inliner in nanobench/skpbench.
This is a reland of 3f35ac10b4

Time to run this experiment again.

Original change's description:
> Performance experiment: Disable SkSL inliner in nanobench/skpbench.
>
> This will allow us to measure the impact (positive or negative) of
> inlining functions before submitting a shader to the driver.
>
> Change-Id: Icbd64096445a353187b30feea68573d89ca18664
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384317
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

Change-Id: I278a770d4129f4ad0bf867c33a01b49a88cea588
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/387256
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-03-20 15:10:16 +00:00
Mike Reed
7cee3efb6b FilterQuality should no longer be needed.
Start to clean up.

Change-Id: I6dea9344d8a19010d6e22ee8d0cd2b795910a82c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386843
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-03-20 14:30:06 +00:00
Robert Phillips
31798c2796 Remove NVPR
Bug: skia:11760
Change-Id: Ie0fc1aaa3120b37b1d452fdc9a8b5cb91b6ffe1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386559
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-03-19 12:26:38 +00:00
Chris Dalton
fd708655ae Reland "Add tooling support for dmsaa"
Reland 188443be8d without the DMSAA bots
to ensure nothing else changes.

Original change's description:
> Add tooling support for dmsaa
>
> Adds a "fAlwaysAntiAlias" flag to GrContextOptions that can be set from
> tooling code. When dmsaa is set, SkGpuDevice draws everything
> antialiased. Adds new "gldmsaa" and "glesdmsaa" configs and creates bots
> to run them.
>
> Bug: skia:11396
> Change-Id: I165e89434b733f7b02312cea0e6649812528083b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384936
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com

Bug: skia:11396
Change-Id: Icb45097e0a34543dc577fa32f19a692e90643a35
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386338
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-03-18 04:57:10 +00:00
Chris Dalton
22dd57b82c Revert "Add tooling support for dmsaa"
This reverts commit 188443be8d.

Reason for revert: It looks like non-dmsaa bots might have been
affected. Let's land first without the new bots to make sure nothing
else changes.

Original change's description:
> Add tooling support for dmsaa
>
> Adds a "fAlwaysAntiAlias" flag to GrContextOptions that can be set from
> tooling code. When dmsaa is set, SkGpuDevice draws everything
> antialiased. Adds new "gldmsaa" and "glesdmsaa" configs and creates bots
> to run them.
>
> Bug: skia:11396
> Change-Id: I165e89434b733f7b02312cea0e6649812528083b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384936
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ib805b417ebd34d1fad79e0e1fe625765ee487f65
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11396
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386336
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Auto-Submit: Chris Dalton <csmartdalton@google.com>
2021-03-17 23:36:12 +00:00
Chris Dalton
188443be8d Add tooling support for dmsaa
Adds a "fAlwaysAntiAlias" flag to GrContextOptions that can be set from
tooling code. When dmsaa is set, SkGpuDevice draws everything
antialiased. Adds new "gldmsaa" and "glesdmsaa" configs and creates bots
to run them.

Bug: skia:11396
Change-Id: I165e89434b733f7b02312cea0e6649812528083b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384936
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-03-17 15:58:40 +00:00
Chris Dalton
180b4a1422 Update tooling code to store surface flags instead of "useDIText"
Change-Id: I4556a6222f358c4a853318703a406caea65d0fd5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385736
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-03-17 15:09:30 +00:00
Ravi Mistry
3aff6ae597 Replace crashing pokemonwiki with intelwiki
intelwiki has html tables to test

Cq-Include-Trybots: luci.skia.skia.primary:Housekeeper-Nightly-RecreateSKPs_DryRun
Bug: skia:11354
Change-Id: I84fb2b91ffd7b28b46bb5d303f546f193a9883d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385498
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-03-16 22:30:25 +00:00
Brian Osman
164bafafbe Reland "On NVIDIA + ANGLE, test 4x MSAA, not 8x"
This is a reland of c0c3231bde

Original change's description:
> On NVIDIA + ANGLE, test 4x MSAA, not 8x
>
> By all accounts, this should produce much more deterministic output,
> letting us remove quite a few ignores.
>
> Bug: skia:6813 skia:6545
> Change-Id: I7bc2c8e05c2f6e8110ea550882d5f0a45548008b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384856
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

Bug: skia:6813 skia:6545
Change-Id: I2bbff8c8807940024eeefbca823656ab105acdd1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384998
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-03-15 18:39:38 +00:00
John Stiles
46e7507b0d Revert "Performance experiment: Disable SkSL inliner in nanobench/skpbench."
This reverts commit 3f35ac10b4.

Reason for revert: concluding experiment

Original change's description:
> Performance experiment: Disable SkSL inliner in nanobench/skpbench.
>
> This will allow us to measure the impact (positive or negative) of
> inlining functions before submitting a shader to the driver.
>
> Change-Id: Icbd64096445a353187b30feea68573d89ca18664
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384317
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

TBR=brianosman@google.com,johnstiles@google.com

Change-Id: Ia7c34e3e2bb4f777a4bd18a5646e494eeb3c93ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384456
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-03-13 13:08:19 +00:00
John Stiles
3f35ac10b4 Performance experiment: Disable SkSL inliner in nanobench/skpbench.
This will allow us to measure the impact (positive or negative) of
inlining functions before submitting a shader to the driver.

Change-Id: Icbd64096445a353187b30feea68573d89ca18664
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384317
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-03-12 20:45:08 +00:00
Chris Dalton
7d592cda58 Delete all low-level rendering from ccpr
This converts ccpr to just a poorly named atlas manager. The atlas
gets rendered by normal calls on its MSAA draw context:

  for (;;) {
      surfaceDrawContext->stencilPath();  // Stencil.
  }
  surfaceDrawContext->stencilRect(atlasBounds);  // Cover.

Bug: chromium:1158093
Change-Id: I758ffd372b2ed5bb8b370156b6f80f6204146700
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381618
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-03-12 17:02:56 +00:00
Chris Dalton
03730e6ca6 Delete path caching and path rendering from ccpr
All that's left is a clip atlas renderer.

Bug: chromium:1158093
Change-Id: I8b509904a752a202ff1321e5302c41a3f57a5edb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383741
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-03-12 16:02:16 +00:00
Robert Phillips
edff467fd4 Add a DirectContextID to GrDirectContexts
Bug: skia:11728
Change-Id: I80ab54f2cfa0bbc69f688e1e598eeeb4bde1a1a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383023
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-03-11 14:58:40 +00:00
John Stiles
f3a28db703 Eliminate control-flow analysis.
We no longer derive a performance benefit from this pass in practice,
and it is a very expensive compilation step. It is also prone to fuzz-
related errors.

Doc: http://go/optimization-in-sksl

Change-Id: Ief08ffac659a8fe7fe92c92b9a5da14c9f713bc2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381261
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-03-11 13:24:54 +00:00
Chris Dalton
2603c1fb14 Delete coverage counting backend from ccpr
This declutters the atlas generation code so there are fewer variables.
Next we will delete all the lower level rendering code and render the
atlas with stencilPath/stencilRect instead.

Bug: chromium:1158093
Change-Id: I36cff285d0f7de6f8ece4b027e62ae84aa01adc8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/380656
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-03-11 04:26:00 +00:00
John Stiles
4d7ac49dca Declare outputColor and outputCoverage inside emitCode.
This is useful because it allows the variables to be declared as `const`
when they are trivial values like `half4(1)`. This enables the constant
folder to simplify or eliminate them. In most cases, this is only a
small benefit, as you'd expect a competent GPU driver to do the same.
However, Mali-400 can benefit significantly from optimizing away the
multiplication against a constant half4(1) coverage in Porter-Duff.

Mali-400 performance is back to normal: http://screen/3cDxdaGkYE8oBcS

Change-Id: I21fd23f91f747079cd05b082f7b3444aeabafb93
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382476
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-03-10 16:03:18 +00:00
John Stiles
7247b48102 Add shader optimization level toggles to Viewer.
This lets us see at a glance what each optimization pass contributes to
our final compiled SkSL output.

Change-Id: I52c56c92c408eee34045c5e6f60298cf9548ff5d
Bug: skia:11319
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381257
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-03-08 16:33:39 +00:00
John Stiles
8ef4d6c882 Add Viewer checkbox to toggle Control-Flow Analysis.
This gives Viewer a way to dynamically toggle CFA off and on, so we can
immediately see the impact on shader optimization.

Change-Id: I912df70de126a74a1f0d11c511b2acc64f1e9f28
Bug: skia:11319
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/380456
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-03-05 22:00:14 +00:00
John Stiles
a8f6b6fe8a Update Shaders tab in Viewer.
- Added "Dump Shaders" button; this writes the shaders to disk in the
  `/resources/sksl` directory. This will allow us to more easily check
  real-world shader code generation, instead of synthetic examples.
- Renamed "Load" and "Save" to "View" and "Apply Changes," to clarify
  that they are not about files on disk. (Otherwise they seemed
  confusing when placed next to a Dump Shaders button.)

Also, fixed a bug which would prevent a new deferred action from being
registered while running deferred actions.

(This CL implements the "test real-world shaders" portion of
http://go/optimization-in-sksl)

Change-Id: I7626a9e9c4f3ecb31b51f29b8106e4ca55de4dd4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/380317
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-03-05 21:47:29 +00:00
Ethan Nicholas
daed2592bb Made SkSL DSL into public API
In addition to the unsurprising changes to eliminate references to
src/, we also had to tighten up some C++17-isms as they are not
permitted in public headers.

Change-Id: Ie5005a33d7a135e69fb66beca5e7a5f960dbd453
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/378496
Reviewed-by: Brian Osman <brianosman@google.com>
2021-03-04 21:03:58 +00:00
Adlai Holler
55aaefe687 Reland "Support sharing promise images between DDLs"
This reverts commit 38b9a4bc3e.

Reason for revert: Fixed ASAN, TSAN, and other bugs via other CLs.

Original change's description:
> Revert "Support sharing promise images between DDLs"
>
> This reverts commit 07e11d48cb.
>
> Reason for revert: Broke DDL3_ASAN and DDL3_TSAN
>
> Original change's description:
> > Support sharing promise images between DDLs
> >
> > - Migrate our code to SkImage::MakePromiseTexture
> > - Have DDLTileHelper share one SKP and one set of promise images across all tiles.
> > - Disallow on-the-fly allocation of mips for promise textures.
> >
> > Bug: skia:10286
> > Change-Id: Ie35976958454fc520f3c9d860e6285441260c9f7
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291938
> > Commit-Queue: Adlai Holler <adlai@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
>
> TBR=robertphillips@google.com,adlai@google.com
>
> Change-Id: I939b14875d1a20e4a92eab94680adcfe9596ad81
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:10286
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375738
> Reviewed-by: Adlai Holler <adlai@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>


Bug: skia:10286
Change-Id: Ibfd7dfcd72f10a4e29a87fa8c610f2dfd018e0db
Cq-Include-Trybots: luci.skia.skia.primary:Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DDL3_ASAN,Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-DDL3_TSAN
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375739
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-03-04 13:10:37 +00:00
Brian Osman
9e1ef99d1e fm: Make --writeShaders dump fragment, vertex, and key files
Bug: skia:11372
Change-Id: Ib764b8d995655317e8968e57b1ea0528339d430b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/379060
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-03-03 20:10:06 +00:00
Brian Osman
f0de96f7b8 Reland "Redesign program key construction"
This is a reland of bbbf1a7f50

Original change's description:
> Redesign program key construction
>
> This does two things:
> 1) Moves responsibility for bit-packing portions of the key into the key
>    itself. A new GrKeyBuilder type manages adding bits, with asserts to
>    ensure a value always fits in the requested number. In theory this
>    will let us generate smaller keys overall, at the expense of slightly
>    more complex code during construction.
> 2) Adds a string label parameter for key methods that fold in data. For
>    new methods, the label is required. To ease migration, the old add32
>    does not require a label (yet). This will let us generate detailed,
>    human readable keys, either based on SK_DEBUG, or a runtime option
>    (if we're comfortable paying the cost).
>
> Bug: skia:11372
> Change-Id: Ib0f941551e0dbadabbd2a7de912b00e9e766b166
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377876
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Bug: skia:11372
Cq-Include-Trybots: luci.skia.skia.primary:Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan
Change-Id: I179ed581bc9ba772191e727274ac0ac6979ebdf3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/378778
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-03-03 17:44:00 +00:00
Brian Osman
acf26501fb Revert "Redesign program key construction"
This reverts commit bbbf1a7f50.

Reason for revert: D3D Failures

Original change's description:
> Redesign program key construction
>
> This does two things:
> 1) Moves responsibility for bit-packing portions of the key into the key
>    itself. A new GrKeyBuilder type manages adding bits, with asserts to
>    ensure a value always fits in the requested number. In theory this
>    will let us generate smaller keys overall, at the expense of slightly
>    more complex code during construction.
> 2) Adds a string label parameter for key methods that fold in data. For
>    new methods, the label is required. To ease migration, the old add32
>    does not require a label (yet). This will let us generate detailed,
>    human readable keys, either based on SK_DEBUG, or a runtime option
>    (if we're comfortable paying the cost).
>
> Bug: skia:11372
> Change-Id: Ib0f941551e0dbadabbd2a7de912b00e9e766b166
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377876
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com

Change-Id: I7bfb20905c87083e84a1ea21bc53d63e882e2c68
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11372
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/378777
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-03-03 13:35:22 +00:00
Brian Osman
bbbf1a7f50 Redesign program key construction
This does two things:
1) Moves responsibility for bit-packing portions of the key into the key
   itself. A new GrKeyBuilder type manages adding bits, with asserts to
   ensure a value always fits in the requested number. In theory this
   will let us generate smaller keys overall, at the expense of slightly
   more complex code during construction.
2) Adds a string label parameter for key methods that fold in data. For
   new methods, the label is required. To ease migration, the old add32
   does not require a label (yet). This will let us generate detailed,
   human readable keys, either based on SK_DEBUG, or a runtime option
   (if we're comfortable paying the cost).

Bug: skia:11372
Change-Id: Ib0f941551e0dbadabbd2a7de912b00e9e766b166
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377876
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-03-02 23:46:48 +00:00
Mike Klein
bc4a36af7c add --race to FM
Try to uncover races by running parallel replicas.

The default --race 0 should keep FM working as before, but now with
--race ≥2 we'll actively try to race replicas, syncing between tests.
--race 1 is almost pointless, just changing the thread tests run on but
without any interesting concurrency.

Rearrange a bit how fm_driver decides what flags to pass to which
invocations of FM, so individual runs can easily override defaults (e.g.
--nativeFonts overriding the usual --nonativeFonts).  Use that here to
set --race 0 for unit tests; many unit tests are not reentrant.

Change-Id: Ida451626c093793b0805d3036beb185e7d54f27e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376761
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-03-02 20:43:05 +00:00
Mike Klein
a9e62e893b add flags for clipping to FM
tabl_mozilla.skp is uselessly large without a clip.

Change-Id: I6e8ab8c31e790b6629be01e6eeb2e8d60c6ff56f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/378360
Reviewed-by: Brian Osman <brianosman@google.com>
2021-03-02 19:06:24 +00:00
Mike Klein
db8340f15f scope AutoreleasePool tightly
We think this has the same effect as written right?

I'm looking ahead to a mode of FM where each round
of this loop might run in a different thread, and
I think there we'd want to give each its own pool?

Change-Id: I8f4e215fb2f96f4fe433d15f8654445200fdca5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377896
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-03-02 16:25:53 +00:00
Mike Klein
4636ac68de print only once per source in FM
This does mean we won't print the name of a failing source, but that
shouldn't be needed so much given how FM runs on the bots... should be
obvious what failed without it.

On the flip side, this means each log line will print out atomically,
which might be nice when reading through TSAN runs with async threads.

Change-Id: Ib971416f255e60ea6d900ea687abb8404d799dfd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377916
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-03-01 19:57:00 +00:00
Jim Van Verth
07c8401a54 Getting Metal shader precompiling working.
* Adds GrMtlPipelineStateBuilder::PrecompileShaders.
* Adds GrMtlPrecompileShaderLibrary.
* Stores metadata with SkSL shaders so we can convert to MSL properly

Change-Id: Id2c23a54cc04ca3b61a639c1cbc7234b697c41ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376856
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-02-26 22:43:17 +00:00
Mike Klein
6706c9fa14 use SkColorInfo in fm
Just refactoring code that predates SkColorInfo.

Change-Id: Iba5ffdf91e2e2517bf55ea8c5a36c4fe6583a6b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376760
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-02-26 19:52:34 +00:00
Robert Phillips
96f6d9a37f Add DDLTileHelper option to tile separately in x & y
afaik Chrome only tiles in Y which should yield less threaded text blob contention

Change-Id: I9ff484ed2ce66428e2d7ca6188eba79cd99b1547
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376608
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-02-26 16:34:51 +00:00
Robert Phillips
1cc7d45f9a Remove ViaDDL
With the removal of promise image texture caching here (https://skia-review.googlesource.com/c/skia/+/375201) we no longer need these configs.

This can't land until after (https://skia-review.googlesource.com/c/skia/+/376221) which removes use of these configs on the bots.

Change-Id: I49e122fc820d5b72498b65933e15bcc74c0f3fa3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376219
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-02-26 15:31:01 +00:00
Brian Salomon
76d13bbdf8 Remove texture idle proc mechanism
Bug: skia:11369
Change-Id: I0d1a74cc64dd74486acbb69df529ccc0f8b63ef3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375202
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-02-25 22:23:20 +00:00
Adlai Holler
38b9a4bc3e Revert "Support sharing promise images between DDLs"
This reverts commit 07e11d48cb.

Reason for revert: Broke DDL3_ASAN and DDL3_TSAN

Original change's description:
> Support sharing promise images between DDLs
>
> - Migrate our code to SkImage::MakePromiseTexture
> - Have DDLTileHelper share one SKP and one set of promise images across all tiles.
> - Disallow on-the-fly allocation of mips for promise textures.
>
> Bug: skia:10286
> Change-Id: Ie35976958454fc520f3c9d860e6285441260c9f7
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291938
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: I939b14875d1a20e4a92eab94680adcfe9596ad81
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10286
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375738
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-02-25 17:55:00 +00:00
Adlai Holler
07e11d48cb Support sharing promise images between DDLs
- Migrate our code to SkImage::MakePromiseTexture
- Have DDLTileHelper share one SKP and one set of promise images across all tiles.
- Disallow on-the-fly allocation of mips for promise textures.

Bug: skia:10286
Change-Id: Ie35976958454fc520f3c9d860e6285441260c9f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291938
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-02-25 17:00:19 +00:00
Chris Dalton
4ac9aadd30 Make it possible to enable hw tessellation outside of test builds
Bug: chromium:1172543
Change-Id: I9733a8758d902a8d46d442de5d099d923efc2184
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375376
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-02-25 16:21:09 +00:00
Ben Wagner
5d9c20ecc9 Make TextBlob 'Text' allocators public.
This will allow users to create PDFs with the actual text embedded. This
will allow for correct search and copy operations on the generated PDF.

Since these are now public, SkTextBlobBuilderPriv is no longer needed
and is removed. For consistency, the allocRunRSXform overload is renamed
to allocRunTextRSXform.

Change-Id: I44be82d9038a433e1221d5cbfd8ed113ecb6d4fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375017
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-02-24 18:48:44 +00:00
Ben Wagner
0baacb50bc Remove lang parameter from TextBlob alloc methods.
The 'lang' was never stored or used, so this makes no current practical
difference. The original intent was to be able to specify a language so
that it could be emitted as a 'Lang' override in the 'ActualText' when
generating a PDF. However, due to the way 'ActualText' is generally used
this would be impractical. If there is ever a desire to mark up sections
of the PDF with a specific language it would be better handled in a
different way.

Change-Id: Id63596190235fc45ce17249b9b578b6f9b838b2b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375060
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-02-24 17:08:04 +00:00
John Stiles
cbd65754f2 Revert "Performance experiment: Disable SkSL optimization in nanobench/skpbench"
This reverts commit b34a896c12.

Reason for revert: experiment is complete

Original change's description:
> Performance experiment: Disable SkSL optimization in nanobench/skpbench
>
> Cloned from http://review.skia.org/369716
> Re-running the experiment now that @switch is supported when
> optimizations are disabled.
>
> Change-Id: I428051d9c679a8084589fba428a637f36587be16
> Bug: skia:11341
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/374516
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,brianosman@google.com,johnstiles@google.com

Change-Id: I1e91c55538ef35f413f2c41c83df9d9c0f29d9a1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11341
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375016
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-02-24 14:14:26 +00:00
Ben Wagner
9a7fcf7eda Scale Viewer status by backing scale.
The Viewer status box 's' is quite small on high resolution displays.
The 'u' key doubles its size and has been used as a work-around, but
let the status box scale take the backing scale into account.

Change-Id: I98db37a4ed86698ba7c02666478dff248ff6daae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/374377
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-02-24 03:42:04 +00:00
John Stiles
b34a896c12 Performance experiment: Disable SkSL optimization in nanobench/skpbench
Cloned from http://review.skia.org/369716
Re-running the experiment now that @switch is supported when
optimizations are disabled.

Change-Id: I428051d9c679a8084589fba428a637f36587be16
Bug: skia:11341
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/374516
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-02-23 22:21:30 +00:00
Brian Salomon
e666254f0f Remove SkImage_Base::peekProxy.
This is the only place we provide a proxy from a SkImage other than
asView() and is only used in one place in the library. Add a utility
function to replace uses in tests based on asView().

Bug: skia:11208
Change-Id: Ica6eae6e5f153f208523331566acc0360925a20e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/373617
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-02-23 19:59:31 +00:00
Robert Phillips
cd1e397350 Add new experimental ddlbench
This intended to let us experiment w/ threaded compilation before having
to worry about upstreaming features.

Change-Id: Id9d1807de0fa16475184203d293e00bfaf5fcc01
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/373736
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2021-02-23 13:15:20 +00:00
Jim Van Verth
2db4ba1caf Reland "Remove ARC from tools lib."
This is a reland of 4c4c80fa12

Original change's description:
> Remove ARC from tools lib.
>
> Trying this in baby steps to manage leaks better.
>
> Change-Id: Id8597ba236c752bcbf1c7ec94f6c1021e636d547
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372556
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Adlai Holler <adlai@google.com>

Change-Id: Ib5c949ee9e8ac9f47de1991297aec718f3185424
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/373616
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-02-22 17:55:52 +00:00
Jim Van Verth
e8a1c0150b Revert "Remove ARC from tools lib."
This reverts commit 4c4c80fa12.

Reason for revert: Need to update Flutter with sk_cf_obj renaming.

Original change's description:
> Remove ARC from tools lib.
>
> Trying this in baby steps to manage leaks better.
>
> Change-Id: Id8597ba236c752bcbf1c7ec94f6c1021e636d547
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372556
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Adlai Holler <adlai@google.com>

TBR=jvanverth@google.com,bsalomon@google.com,adlai@google.com

Change-Id: I7dc226d002184b80a1d8d2aee09d122d2e13d732
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372680
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-02-20 00:08:41 +00:00
Jim Van Verth
4c4c80fa12 Remove ARC from tools lib.
Trying this in baby steps to manage leaks better.

Change-Id: Id8597ba236c752bcbf1c7ec94f6c1021e636d547
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372556
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2021-02-19 22:21:43 +00:00
Brian Osman
4f065e286d Revert "Performance experiment: Disable SkSL optimization in nanobench/skpbench"
This reverts commit 5ad759065d.

Reason for revert: Experiment concluded - got the data we need.

Original change's description:
> Performance experiment: Disable SkSL optimization in nanobench/skpbench
>
> Change-Id: I974571e7e0e9d0170f92b970d425d9ce530e312e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369716
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=bsalomon@google.com,brianosman@google.com,johnstiles@google.com

Change-Id: I68bc07e8a604abb77fe9c1f1dac794ab7b90b9e9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/370156
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-02-13 01:06:13 +00:00
Nathaniel Nifong
ba4c3086ba Move GPU locking logic into generic hardware profile
Change-Id: If130b47acdd7f7fc06daa1d4cb5938e4476e0171
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367776
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2021-02-12 23:01:08 +00:00
Adlai Holler
79426194de Pipe ReducedOpsTaskSplitting into skpbench.py
This ought to help!

Bug: skia:10877
Change-Id: I8265c26dc4146ab78c125f27b533915cfb61aae8
Cq-Include-Trybots: luci.skia.skia.primary:Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_ReduceOpsTaskSplitting_Skpbench,Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_ReduceOpsTaskSplitting_Skpbench,Test-Debian10-Clang-NUC7i5BNK-GPU-IntelIris640-x86_64-Debug-All-ASAN_ReduceOpsTaskSplitting_Vulkan
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369756
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-02-12 19:32:02 +00:00
Brian Osman
5ad759065d Performance experiment: Disable SkSL optimization in nanobench/skpbench
Change-Id: I974571e7e0e9d0170f92b970d425d9ce530e312e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369716
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-02-12 16:02:25 +00:00
James Clarke
b8c0dab90b Add UWP support
Bug: skia:11102
Change-Id: I4ed9e44099cd780c5cdede3eb179c0e6a92d3ce5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345219
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Chris Bracken <cbracken@google.com>
2021-02-10 19:04:42 +00:00
Ben Wagner
f5cbbc6c15 SkScalerContext to handle hairline paths.
Create an actual hairline path instead of a filled path. Allow metric
and image generation for glyphs to handle hairlines in the event a color
glyph has an outline and a hairline is needed. This also fixes glyph
bounds issues with path based glyphs drawn with hairlines.

Stroke+Fill is not handled very well, but is currently being deprecated
and so given less weight. It works, but is somewhat arbitrary.

Also add more paint overrides to Viewer.

Note that this only adds hairline handling for backup purposes. The code
in SkStrikeSpec::ShouldDrawAsPath which causes most harline glyphs to be
drawn directly from paths is not changed.

Change-Id: Icfadcd818d20b2557e4703c8e99d6d7dd0b4af70
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368156
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-02-09 18:43:15 +00:00
Ben Wagner
e573626c33 Allow filtering RSXForm text in viewer.
Prior to this change Viewer would crash in debug or act quite strangely
in release when attempting to filter any RSXForm blobs. This adds the
ability to allocate an RSXForm run and directly query the number of
positioning scalers per glyph it contains.

Change-Id: I90e118102a0f4d535e97026eecad9ac2f70e448f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367957
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-02-09 02:57:57 +00:00
Mike Klein
fa962f583a rerun only what makes unknown hashes
If a batch fails, we've got to rerun everything (or at least from the
failure on), but when it's merely unknown hashes, no need to rerun
what's produced hashes we know already.

Small tweak to FM to keep all the printed source names exactly what's
passed in, keeping the whole path for skp/svg/image files.  This means
zero bookkeeping needed to know what to rerun when parsing that output.

Change-Id: I1e7ed3ee51158b68a6bdd3152560f3a282109576
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/365818
Reviewed-by: Mike Klein <mtklein@google.com>
2021-02-04 10:22:52 +00:00
Brian Osman
d76d1863f9 Remove 'f' prefix on SkRuntimeEffect::Uniform struct
Change-Id: Ibb48d30b9c0d80db3bf7b92d8c4a60bd9ce6839d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/365696
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2021-02-04 01:57:53 +00:00
Herb Derby
1db274d0b9 add sample output to skpbench
Change-Id: I67338888313b11dceec1548e3e031cff92bf46f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364956
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2021-02-03 17:25:59 +00:00
Nathaniel Nifong
9109dc17af Skpbench: perform core locking functionality into generic hardware profile
Change-Id: Id1c7d156276bca53f8cbac64997ad3f1c139cf4b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364836
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2021-02-03 16:40:19 +00:00
Mike Klein
d50ac5c626 break huge conversions into batches
skcms_Transform(...,N) requires N*bpp to fit in int, but the full
unclipped tabl_mozilla.skp is too big for that.  So break the work up
into calls of no more than 2^27 pixels, i.e. max 1GB at a time.

We could change skcms or clip tabl_mozilla.skp, but this seems fun.

Change-Id: Iaa0b8268851160c179b9501a09ca769b363dafe3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364417
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-02-03 14:51:10 +00:00
Mike Klein
d1131b6aa0 fix FM svg harness
Without this we'd assert on empty container size.

Change-Id: I697d607af40ac6e62039be33aedb8ff1732d41b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364839
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-02-03 01:08:28 +00:00
Robert Phillips
9c2ab4c467 Just skip corrupt JPEG image draws when rendering DDLs
Bug: skia:11243
Change-Id: Ia83b1a43c4e25d62a6f3170b8ddc7e4b5e543b52
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364577
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-02-02 17:06:22 +00:00
Ben Wagner
f9a0f1a9be Viewer scale factor improvement.
This change treats all slides as being in units of points (not pixels).
Window dimensions are communicated to slides in terms of points. This
allows slides which use the window dimensions for scaling to remain in
the same unit space as the gms. Allowing thh slides to also know the
actual pixel dimensions is left for later (this may be wanted when
testing proper selection of bitmap resources).

This also splits the backing scale from the zoom factor. The backing
scale is allowed to be toggled by the user. This allows for easy
reproduction at nominal size. When the backing scale is turned off the
points and the pixels are the same size. Slides which use the window
dimensions for scaling have the backing scale moved from the Viewer
transform to the window dimensions which are reported in pixels
(which are equal to points) when the backing scale is turned off.

Change-Id: Id288c4d8664a0a0972f1171a6159101c2b4ae90f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364018
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-02-02 01:29:29 +00:00
Ravi Mistry
af9c1eb54d [RecreateSKPs bot] Add new motionmark SKP to the repo
Bug: skia:11244
Change-Id: I0abe01db3820b5d6845ca5e848990e87ced9d17e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363783
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-02-01 19:43:22 +00:00
Ravi Mistry
53ce5aa46b [RecreateSKPs bot] Fix failing reddit pageset
Bug: skia:11243
Change-Id: I10d5f19df6d135aac2765b60877bcb0cf5f9741a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363781
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-02-01 19:42:53 +00:00
Brian Osman
383168902b Particle refactor: Only have one code string, uniforms, etc.
Leverage the field visitor to temporarily support effects with the old
JSON layout.

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

Change-Id: Ifab128172089fe9e570be96d7067c6c9d25aae9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363878
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2021-02-01 19:29:48 +00:00
Mike Reed
1de89c48c3 Don't use filter-quality
Bug: skia:11235
Change-Id: I184402f1c9d0f707ccfce761e3c5dbc3084e6c14
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362837
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-30 16:09:23 +00:00
Ben Wagner
fa8b5e4502 Add support for retina displays to sk_app.
The macOS view system is in "big pixel" units, so translate these
into "physical pixel" units.

To compensate, add sk_app::Window::scaleFactor() which returns the
scale factor. The viewer app is modified to apply the inverse of
this scale factor to the current zoom level.

Change-Id: I4fac066a230c87793fc5a0e5a582d60d25e46e7b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361558
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-01-29 17:33:48 +00:00
Brian Osman
6b37bd15ca Sort loaded particle effects alphabetically
Minor tweak to the UI on the Particles slide

Change-Id: I4d60be7fa843ea2717f27406a18e133e30662010
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362096
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-01-29 16:21:48 +00:00
Tyler Denniston
96a97497b3 Update SVG asset creation to handle images
This CL updates the infra scripts used to create the CIPD asset for
SVG's corpus on gold to download and include image resources.

Summary of changes:
- Change svg_downloader.py input argument to more generic name
- Add --keep_common_prefix arg to svg_downloader.py to preserve the
  directory hierarchy for images, needed for the W3C test suite.
- Update infra SVG create.py script to download images
- Add svg_images.txt file with a list of the images we need for the W3C
  test suite already in gold.

Actually updating the corpus will happen in a separate CL.

Bug: skia:11229
Change-Id: I5fe9be35db247f577bda6040ca3694a428314d0e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361516
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2021-01-28 21:00:24 +00:00
Mike Reed
b339d051e0 pass sampling to drawImage
Bug: skia:7650
Change-Id: I0fa4c5f3fb350705f78ee91f4bdfb4edd83d0ed9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361360
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-28 17:56:52 +00:00
Mike Reed
ecdd979bc0 drawBitmap is deprecated
Bug: skia:11216
Change-Id: I4affb8e00ff7e7b3e8d873ddfd653f397ca8d928
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360979
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-28 02:44:21 +00:00
Florin Malita
24df67d04e Reland "[svg] Plumb a ResourceProvider"
This is a reland of dd29e20904

Original change's description:
> [svg] Plumb a ResourceProvider
>
> ... for image loading.
>
> Update the SVG tools to pass local/FS resource providers.
>
> Change-Id: I2c0e446047da87f177fde0f23b7ea1f0a856e808
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359996
> Commit-Queue: Florin Malita <fmalita@google.com>
> Reviewed-by: Tyler Denniston <tdenniston@google.com>

Change-Id: I28de60b299fc89f46b090812fc632105143fb6da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360607
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
2021-01-27 21:12:23 +00:00
Florin Malita
64400d95d6 Revert "[svg] Plumb a ResourceProvider"
This reverts commit dd29e20904.

Reason for revert: breaking the G3 roll

Original change's description:
> [svg] Plumb a ResourceProvider
>
> ... for image loading.
>
> Update the SVG tools to pass local/FS resource providers.
>
> Change-Id: I2c0e446047da87f177fde0f23b7ea1f0a856e808
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359996
> Commit-Queue: Florin Malita <fmalita@google.com>
> Reviewed-by: Tyler Denniston <tdenniston@google.com>

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

Change-Id: If5f9673f9ff40dd5f8a8f9cf8f46a4342f29f31f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360602
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-01-27 18:53:31 +00:00
Florin Malita
dd29e20904 [svg] Plumb a ResourceProvider
... for image loading.

Update the SVG tools to pass local/FS resource providers.

Change-Id: I2c0e446047da87f177fde0f23b7ea1f0a856e808
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359996
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2021-01-27 14:10:09 +00:00
Ben Wagner
056bd0dd98 Fix leak of X window title.
Running 'viewer' on Linux with an ASan build produced LSan reports about
leaking textproperty.value. The documentation for
XStringListToTextProperty states that it is up to the user to free the
XTextProperty::value returned with XFree.

In addition, check the return value of XStringListToTextProperty for
failure.

Change-Id: I0db45d3d94f7c8126049c6a343b1aa121f9a7523
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357597
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-01-26 21:44:38 +00:00
Mike Reed
34a0c97f5e don't use drawBitmap
Bug: skia:11216
Change-Id: I89a40e330f27f30c461f2b6012bf26c082b66094
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359076
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-26 02:24:21 +00:00
Mike Reed
844beb5eef get image from skcodec
Part of the larger work to remove drawImage from canvas (and in general
simplify our apis w.r.t. older patterns like skbitmap).

Change-Id: If208927e1d46256519036c42e68aec3d3c809a82
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358836
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-25 21:50:16 +00:00
Mike Reed
9911630fc2 Hide misc non-sampling draw methods
Related chrome CL:
https://chromium-review.googlesource.com/c/chromium/src/+/2646604

Bug: skia:7650
Change-Id: I1069a6151cb70bb6d2c743cf2513f47284c9df7b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358221
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2021-01-25 17:54:56 +00:00
Brian Salomon
bacbb92d8d Revert "Revert "Reland "asyncRescaleAndRead supports unpremul results on GPU"""
This reverts commit 7f296c421e.

Bug: skia:11019
Change-Id: Ia6aa029abc0cf6a3ccd5467e67e5faa2c0239955
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/353616
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-01-22 14:21:01 +00:00
Mike Reed
e02d7f844b More hiding of legacy drawImage calls
Also cleanup some of the duplicate code in SkRecords

Bug: skia:7650
Change-Id: I4d3167a892c126c19a54002beab25c9a6c96fa5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357000
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-22 13:53:42 +00:00
Brian Osman
e89d8ea20b Update particle system to use skvm, rather than ByteCode
This was the last remaining user of ByteCode. The skvm solution
is faster, and lets us delete the ByteCode system.

Testing on 15 instances of sinusoidal_emitter (90k particles):
  - ByteCode                     ~9   ms
  - ByteCode (older, optimized): ~5.5 ms
  - skvm                         ~2.1 ms

Change-Id: Ia2e5c9ab2d36c97e59af28a6f989bf212889e439
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356919
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2021-01-21 23:07:29 +00:00