When we enabled this, at that time CCPR atlasing would
auto-disable when reordering was enabled, so the perf
impact was unclear.
Since then, CCPR atlasing has been disabled for everyone,
so let's flip this flag, get some perf data, and then flip it back.
Bug: skia:10877
Change-Id: I67f081981e84c573dfc2907018b50c740f3a32cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/411216
Auto-Submit: Adlai Holler <adlai@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Skia has an atlas clipping mode (historically called CCPR clipping) that
doesn't quite work. It will fail on blend modes that require a dst read
and is also drawing the complexclip_* tests wrong on several devices.
We plan to rewrite the clip atlas, but in the meantime we need to
disable the "CCPR" clipping.
Bug: b/188794626
Change-Id: I126030a2a81057ffca85fd8b8e7db97b716451ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408557
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Fixed: dawn:788
Change-Id: I2ec810fdd177aff61519192c234d5cb8cabe68d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409236
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@google.com>
Reviewed-by: Stephen White <senorblanco@google.com>
Also three fixes for drawing to offscreen layers in MSKPPlayer:
*Only play from last full redraw to next cmd
*Clear before full redraw
*Actually track current cmd in layer state.
Bug: skia:11900
Change-Id: I988afb61f96c8acb7e7554d65bfa6cd6020196c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407460
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I674f038600afd6d49316c1ece515941ee5579068
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406939
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This effectively reverts a80ce1a36d,
and goes back to using SkMakeSpan (which works in C++14).
Change-Id: Iaa63c86b5acaadbdd60588b0a5c703820e810770
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406938
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Currently our ANGLE vendor/renderer detection is based ANGLE's D3D
backends. To detect on the GL backend it'd be helpful to reuse the
normal GL detection after extracting the relevant GL backend strings
that ANGLE puts in GL_RENDERER in its GLES frontend. This is a step in
that direction.
Bug: 1203705
Change-Id: I5367c49e8aaee2e138088316566f95900b9c4831
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405689
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Should not change functionality.
Bug: 1203705
Change-Id: I2a17fb0ccb729033c964a138dbd5e86be7f93d9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405200
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Chromium has been updated to use makeAnalysisCanvas directly and there are
no more references to SkTextBlobDiffCanvas as a type in its code base.
Since the GlyphTrackingDevice extends SkNoPixelsDevice, any SkCanvas that
uses it is effectively a "no-draw" canvas. However, by returning a base
SkCanvas the text tracking now automatically happens in the context of
the base's AutoLayerForImageFilter handling it applies on every draw. This
means that drawing a text blob with an image filter that modifies the
transform state will now be analyzed in that context automatically
(simplifying code in chrome after this lands).
Another behavioral change is that all non-text draws will still go through
the base SkCanvas' virtuals and invoke the device function. Since it's an
SkNoPixelsDevice, it'll still be a no-op, it just happens a little later.
This won't really impact performance because oop-r already inspects their
operations and only plays back text and transform related ones to the
analysis canvas, so we shouldn't really see non-text draws being invoked
anyways.
Bug: chromium:1187246
Change-Id: I83f86571300751f385b3065dfe889f218fa1edc6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405196
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This is a reland of adadb95a9f
... adds a temporary workaround for some Android framework code.
Original change's description:
> Better first-class shader & color filter support in runtime effects
>
> This does a few things, because they're all intertwined:
>
> 1) SkRuntimeEffect's API now includes details about children (which Skia
> stage was declared, not just the name). The factories verify that the
> declared types in the SkSL match up with the C++ types being passed.
> Today, we still only support adding children of the same type, so the
> checks are simple. Once we allow mixing types, we'll be testing the
> declared type against the actual C++ type supplied for each slot.
> 2) Adds sample variants that supply the input color to the child. This
> is now the only way to invoke a colorFilter child. Internally, we
> support passing a color when invoking a child shader, but I'm not
> exposing that. It's not clearly part of the semantics of the Skia
> pipeline, and is almost never useful. It also exposes users to
> several inconsistencies (skbug.com/11942).
> 3) Because of #2, it's possible that we can't compute a reusable program
> to filter individual colors. In that case, we don't set the constant
> output for constant input optimization, and filterColor4f falls back
> to the slower base-class implementation.
>
> Bug: skia:11813 skia:11942
> Change-Id: I06c41e1b35056e486f3163a72acf6b9535d7fed4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401917
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
Bug: skia:11813 skia:11942
Change-Id: I2c31b147ed86fa8c4dddefb7066bc1d07fe0d285
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404637
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit adadb95a9f.
Reason for revert: breaking android
Original change's description:
> Better first-class shader & color filter support in runtime effects
>
> This does a few things, because they're all intertwined:
>
> 1) SkRuntimeEffect's API now includes details about children (which Skia
> stage was declared, not just the name). The factories verify that the
> declared types in the SkSL match up with the C++ types being passed.
> Today, we still only support adding children of the same type, so the
> checks are simple. Once we allow mixing types, we'll be testing the
> declared type against the actual C++ type supplied for each slot.
> 2) Adds sample variants that supply the input color to the child. This
> is now the only way to invoke a colorFilter child. Internally, we
> support passing a color when invoking a child shader, but I'm not
> exposing that. It's not clearly part of the semantics of the Skia
> pipeline, and is almost never useful. It also exposes users to
> several inconsistencies (skbug.com/11942).
> 3) Because of #2, it's possible that we can't compute a reusable program
> to filter individual colors. In that case, we don't set the constant
> output for constant input optimization, and filterColor4f falls back
> to the slower base-class implementation.
>
> Bug: skia:11813 skia:11942
> Change-Id: I06c41e1b35056e486f3163a72acf6b9535d7fed4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401917
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,bsalomon@google.com,brianosman@google.com
Change-Id: I94ba57e73305b2302f86fd0c1d76f667d4e45b92
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11813 skia:11942
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404117
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This does a few things, because they're all intertwined:
1) SkRuntimeEffect's API now includes details about children (which Skia
stage was declared, not just the name). The factories verify that the
declared types in the SkSL match up with the C++ types being passed.
Today, we still only support adding children of the same type, so the
checks are simple. Once we allow mixing types, we'll be testing the
declared type against the actual C++ type supplied for each slot.
2) Adds sample variants that supply the input color to the child. This
is now the only way to invoke a colorFilter child. Internally, we
support passing a color when invoking a child shader, but I'm not
exposing that. It's not clearly part of the semantics of the Skia
pipeline, and is almost never useful. It also exposes users to
several inconsistencies (skbug.com/11942).
3) Because of #2, it's possible that we can't compute a reusable program
to filter individual colors. In that case, we don't set the constant
output for constant input optimization, and filterColor4f falls back
to the slower base-class implementation.
Bug: skia:11813 skia:11942
Change-Id: I06c41e1b35056e486f3163a72acf6b9535d7fed4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401917
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Bug: skia:11900
Change-Id: I97d1f2a9523252318ffb4f479b197cb0ef9cf0b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402920
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>