Commit Graph

4932 Commits

Author SHA1 Message Date
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
Nathaniel Nifong
110367dcfc Fix most remaining wasm gm unit tests by correctly providing gl context
The basic problem was that WasmContextInfo shadowed non-virtual members
of ContextInfo. the tests, which work with that type, end up calling the
super class's methods which return null for directContext()

The context created and stored in WasmContextInfo would have worked if it
could be returned, but I've opted to go with what looks like a more
canonical way to test a new backend, that is to create a platform-
specific subclass of GLTestContext, and let GrContextFactory create the
GL context.

Bug:skia:10869

Change-Id: Ie9e1142cf2e7268242ff9aab70f76151714850a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/355116
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-01-21 20:46:19 +00:00
Mike Reed
821a84558b remove dead code from old drawimage virtuals
Bug: skia:7650
Change-Id: Ie6bce2130519655645b7c5602d364cd0e1d6fdf3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356358
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-21 01:26:15 +00:00
Mike Reed
18aeb5731b Hide legacy drawImage methods
Migrate clients to use drawImage(... sampling)
rather than relying on paint's filter-quality.

This CL just gets started, introducing the build-flag.

Bug: skia:7650
Change-Id: I4afdd964c6f805058afee0a8f3a6887d501ad42b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356076
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-01-20 00:59:26 +00:00
Brian Salomon
9679612d6b Reland "Test all YUVA image factories with different encoded origins."
This reverts commit f1650efc55.

Reason for revert: fix for cpu/ddl configs

Original change's description:
> Revert "Test all YUVA image factories with different encoded origins."
>
> This reverts commit 2ba80af000.
>
> Reason for revert: new test fails ddl and cpu configs on imggen
>
> Original change's description:
> > Test all YUVA image factories with different encoded origins.
> >
> > Now that SkImage_GpuYUVA stores a GrYUVATextureProxies it supports
> > encoded origins.
> >
> > Modify wacky_yuv_format GMs to use different origins and remove
> > restriction in SkImage::MakeFromYUVAPixmaps.
> >
> > Bug: skia:10632
> > Change-Id: I02477d592b7baba164944d629eeac48223698c10
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/353623
> > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
>
> TBR=jvanverth@google.com,bsalomon@google.com
>
> Change-Id: If909ee4769cc1c74e1682a5e2870ec85a83f65c5
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:10632
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/354661
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

# Not skipping CQ checks because this is a reland.

Bug: skia:10632
Change-Id: Iafe79ab5b3ce0ff9e3a4007e5d8fbc44edded196
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/355630
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-01-19 21:11:05 +00:00
Mike Reed
2ac6ce8e6e Simplify common case for recttorect
Change-Id: I70e295a677b8cac3d578e3cd57472c833af03877
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/354336
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-15 18:37:46 +00:00
Mike Reed
5ec22387ff Simplify common case of linear filtering with no mips
Change-Id: I08b4a7bc088705b93a0aa680f6733d09c7ad23dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/354221
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-15 16:47:16 +00:00
Mike Klein
4f4c064d5b roll gn to latest
Nice periodically, and this version also has a Mac arm64 binary.

Refine a few visibility rules from ":*" (any target in this file)
to "./*" (any target in any .gn file anywhere under this directory).

Use frameworks over libs where now required.

Change-Id: Ic19e1533e2810d18ae4684645d8555b422320b7f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/354536
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-01-15 15:34:00 +00:00