Commit Graph

1521 Commits

Author SHA1 Message Date
Joe Gregorio
555b7a4d77 [particles] Fix up URLs for the particles migration.
Bug: skia:11108
Change-Id: Id41d061adbaab325634a2497fc96e4fc89bde6ea
Docs-Preview: https://skia.org/?cl=356762
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356762
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-01-25 20:44:32 +00:00
Brian Osman
ce75036b3e SkSL: Remove ByteCode interpreter, generator, etc.
Change-Id: Ib150e6d6d3de34a85ce8051eea843ab3b2d7ab75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356921
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2021-01-22 14:38:41 +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
Brian Salomon
0c0b5a6bb2 Remove SkYUVASizeInfo, make SkYUVAIndex a private part of SkYUVAInfo
Bug: skia:10632
Change-Id: If4dd7779b0856f6d0b441381bf7f2f51527cdb9d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/352497
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-01-12 15:06:26 +00:00
Martin Kustermann
b65d29919d Fix C API example, ensure the C API example is built in CI
Change-Id: I25529ec79bd53dcd475a959503d15b1be7d39970
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344616
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-12-15 16:38:42 +00:00
Ravi Mistry
2c98edf07f Spelling and capitalization fixes from GitHub PRs
Inspired by
* https://github.com/google/skia/pull/18
* https://github.com/google/skia/pull/22

Change-Id: I4c092978f928ff2f589b6440d1fcdd846fa2b56f
Docs-Preview: https://skia.org/?cl=342925
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342925
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2020-12-10 18:40:09 +00:00
Nathaniel Nifong
e38a9e7f18 handle different bounds for every frame
b:skia:11045

Change-Id: I0547b329fde8edcbc275992c7c5168e788294ba8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341045
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-12-07 20:52:10 +00:00
Mike Reed
5f9ba6953f fix debugger bindings
Change-Id: Ie70a79ca907ffb4b30247d3d8564b7183a6e04f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340658
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-03 19:18:07 +00:00
Nathaniel Nifong
a084ef4291 Add supporting function for finding image use in layers
Change-Id: I39d3a95a3854875d15992b73ee16521d3bf28c8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/337596
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-11-24 17:04:56 +00:00
Robert Phillips
2c21a11923 Remove uses of SkCanvas::flush
afaict the perf surprises associated with:

https://skia-review.googlesource.com/c/skia/+/334417 (Remove SkBaseDevice::flush)

were bc Ganesh resolves MSAA buffers for SkCanvas::flush but doesn't do so for GrDirectContext::flush.

Where possible this CL switches SkCanvas::flush to SkSurface::flush (which will also resolve MSAA buffers) so that when https://skia-review.googlesource.com/c/skia/+/334417 relands there should not be any performance surprises.

Change-Id: I705ad6219f0f625a88cf3f9e8b2418a3182d298c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335866
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-11-20 21:42:38 +00:00
Nathaniel Nifong
f403dd2426 update debugger wasm makefile
Change-Id: I4d8ed14bfee5f00e3babe909ce625304f63aa504
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/336419
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-11-19 16:45:10 +00:00
Brian Salomon
94584f4574 Remove unused macros from GrGLConfig.h, GrGLConfig_chrome.h, and scripts
Change-Id: I5a9e7d490fd71f326ac37a72eb942fc64f557733
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335666
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-11-18 20:23:35 +00:00
Nathaniel Nifong
ffc7a21490 update externs for debugger_bindings.cpp
include minVersion function in externs

Change-Id: I4789240fb5f2dac701d948d8cacc997c7bcf444b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335640
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-11-18 16:09:14 +00:00
Nathaniel Nifong
1ce8964db1 Move SKP version extraction into JS
two reasons:
1. It prevents any crash during reading from prevening a version number being returned from wasm.
2. It lets me use a common solution for reading a version number from SKP files and MSKP files.

bug:skia:10832

Change-Id: Icad27690aac9d614d72140ea4b88b350faf21a4f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/334897
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-11-16 22:54:20 +00:00
Nathaniel Nifong
a06b63c56e Deprecate some debugger bindings in favor of ones that better serve the lit html debugger
The deprecated ones can be removed when the polymer debugger is gone.

Change-Id: I351f1c691d7a95fea594c7e001f9b16c15d216a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/334160
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-11-12 23:01:56 +00:00
Brian Salomon
e4387382c2 Split SkYUVAInfo::PlanarConfig into PlaneConfig and Subsampling enums
Sometimes it's helpful to think about subsampling separately from
how the channels are spread across planes.

Bug: skia:10632
Change-Id: Ib03f71195f9706ef6def418b1f2125c29e0cf738
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/334102
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-11-11 22:42:36 +00:00
Nathaniel Nifong
98f78232ae Add a method to search for the command that shades a pixel.
Supports a streamlined breakpoint workflow in the new debugger.
not used in the current debugger.

Change-Id: I9f30c92357c24e145a19c794e935e2c05594d883
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332256
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-11-05 19:44:22 +00:00
Florin Malita
a5e8f6b402 [svg] Post-relocation cleanup
Remove transitional headers and build file workarounds.

Change-Id: Iebe63d44b6ae3a736c7b31a45975056ec92b91cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327716
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2020-10-18 19:29:38 +00:00
Florin Malita
b3418103e9 Reland "[svg] Relocate out of experimental"
Move the SVG rendering code to modules/svg, and componentize.
Also split into include/src/utils.

As external clients still reference the old header locations,
introduce temporary forwarding headers to facilitate the migration.

This reverts commit d6cf56fd34.

TBR=

Change-Id: Ibadd7c8dc0464ec0c27841530ade0c2098305d20
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327344
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
2020-10-16 02:32:41 +00:00
Robert Phillips
d6cf56fd34 Revert "[svg] Relocate out of experimental"
This reverts commit 6fc4106a9d.

Reason for revert: Blocking the Android roll

Original change's description:
> [svg] Relocate out of experimental
>
> Move the SVG rendering code to modules/svg, and componentize.
> Also split into include/src/utils.
>
> As external clients still reference the old header locations,
> introduce temporary forwarding headers to facilitate the migration.
>
> Change-Id: Ib289dbdcd80c16a01c47805e7242f2e08bebc165
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326948
> Reviewed-by: Tyler Denniston <tdenniston@google.com>
> Commit-Queue: Florin Malita <fmalita@google.com>

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

Change-Id: I386cf77a15a9e1d392029804abaf937dae53f435
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327342
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-15 18:54:18 +00:00
Adlai Holler
1a364272be Migrate debugger & canvaskit to GrDirectContext
Change-Id: I57e0b28da89870cd9c7708283b64613368008c54
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327158
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-15 16:07:06 +00:00
Florin Malita
6fc4106a9d [svg] Relocate out of experimental
Move the SVG rendering code to modules/svg, and componentize.
Also split into include/src/utils.

As external clients still reference the old header locations,
introduce temporary forwarding headers to facilitate the migration.

Change-Id: Ib289dbdcd80c16a01c47805e7242f2e08bebc165
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326948
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-10-15 14:36:06 +00:00
Adlai Holler
dd09d6e2ef Migrate skottiekit to GrDirectContext
Change-Id: I6767070f63ba19a61ac6766254b9e524b7bbc8a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326901
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-10-15 13:27:16 +00:00
Florin Malita
30f5f828bc Delete SkPEG
Not used.

TBR=
Change-Id: I0c545c23e04bd8c63fadc07023363e4978e87b1b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326838
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-10-14 17:37:12 +00:00
Florin Malita
3bfeab7d95 Reland [svg] Add svg_tool
A simple svg -> png converter, to demonstrate basic API usage.

TBR=

Change-Id: Id723946e2c1cbdaf324a24202279cb6a6d7082b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325460
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-10-12 16:18:27 +00:00
Robert Phillips
91c752a014 Revert "[svg] Add svg_tool"
This reverts commit 2531de9926.

Reason for revert: Breaking some builds

Original change's description:
> [svg] Add svg_tool
>
> A simple svg -> png converter, to demonstrate basic API usage.
>
> TBR=
> Change-Id: I34417c437b91e97811f5db512a9e79aa5cc099b8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325336
> Reviewed-by: Florin Malita <fmalita@google.com>
> Commit-Queue: Florin Malita <fmalita@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>

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

Change-Id: I59117a1764a3a98bd910a3a76a44d9bba8bc2de4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325456
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-12 13:49:49 +00:00
Florin Malita
2531de9926 [svg] Add svg_tool
A simple svg -> png converter, to demonstrate basic API usage.

TBR=
Change-Id: I34417c437b91e97811f5db512a9e79aa5cc099b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325336
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-10-12 02:24:36 +00:00
Kevin Lubick
adbd312a46 Fix debugger to work with new emsdk
Change-Id: I53fcf34e42604322f9e285de2bae4e37ccc60f6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324120
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-08 18:08:06 +00:00
Brian Salomon
107114dd1d Fix debugger bindings after SkSurface::flushAndSubmit change.
Also rm extra space in CK binding.

Change-Id: I3ec50d24cf77ed7773bd0f9c7a6a141221ecd063
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323104
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-10-06 19:41:31 +00:00
Adlai Holler
0ce2c54094 Reland "Reland "Take GrContext private, GrDDLContext inherit from GrRecordingContext""
This reverts commit cf43fc6768.

Reason for revert: Fixed g3

Original change's description:
> Revert "Reland "Take GrContext private, GrDDLContext inherit from GrRecordingContext""
>
> This reverts commit ff13ffbeac.
>
> Reason for revert: Blink in g3
>
> Original change's description:
> > Reland "Take GrContext private, GrDDLContext inherit from GrRecordingContext"
> >
> > This reverts commit 89bdc90ac8.
> >
> > Reason for revert: Fix metal
> >
> > Original change's description:
> > > Revert "Take GrContext private, GrDDLContext inherit from GrRecordingContext"
> > >
> > > This reverts commit d2daa94ede.
> > >
> > > Reason for revert: Metaru
> > >
> > > Original change's description:
> > > > Take GrContext private, GrDDLContext inherit from GrRecordingContext
> > > >
> > > > Woo!
> > > >
> > > > Change-Id: I8d201b709343dc18cad31ea740575285dd035f35
> > > > Docs-Preview: https://skia.org/?cl=317436
> > > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317436
> > > > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > > Commit-Queue: Adlai Holler <adlai@google.com>
> > >
> > > TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
> > >
> > > Change-Id: I9b58dee285fbdc49ebc8e76df5da0fe224cf9787
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318758
> > > Reviewed-by: Adlai Holler <adlai@google.com>
> > > Commit-Queue: Adlai Holler <adlai@google.com>
> >
> > TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
> >
> >
> > Change-Id: Id4b10795193a904cd4ed8c36e60e74abe3b6702a
> > Docs-Preview: https://skia.org/?cl=318759
> > Cq-Include-Trybots: luci.skia.skia.primary:Build-Mac10.15.5-Clang-arm64-Debug-iOS_Metal,Build-Mac-Clang-x86_64-Debug-Metal
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318759
> > Commit-Queue: Adlai Holler <adlai@google.com>
> > Reviewed-by: Adlai Holler <adlai@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
>
> Change-Id: Ib20fe933120d56b72efaec73a0bedec60bc28def
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319184
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Adlai Holler <adlai@google.com>

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


Change-Id: I4f01291f4b3bfbb8fd7dd8cf2bf8415430c3392e
Docs-Preview: https://skia.org/?cl=322437
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322437
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
2020-10-06 18:59:11 +00:00
Adlai Holler
cf43fc6768 Revert "Reland "Take GrContext private, GrDDLContext inherit from GrRecordingContext""
This reverts commit ff13ffbeac.

Reason for revert: Blink in g3

Original change's description:
> Reland "Take GrContext private, GrDDLContext inherit from GrRecordingContext"
>
> This reverts commit 89bdc90ac8.
>
> Reason for revert: Fix metal
>
> Original change's description:
> > Revert "Take GrContext private, GrDDLContext inherit from GrRecordingContext"
> >
> > This reverts commit d2daa94ede.
> >
> > Reason for revert: Metaru
> >
> > Original change's description:
> > > Take GrContext private, GrDDLContext inherit from GrRecordingContext
> > >
> > > Woo!
> > >
> > > Change-Id: I8d201b709343dc18cad31ea740575285dd035f35
> > > Docs-Preview: https://skia.org/?cl=317436
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317436
> > > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > Commit-Queue: Adlai Holler <adlai@google.com>
> >
> > TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
> >
> > Change-Id: I9b58dee285fbdc49ebc8e76df5da0fe224cf9787
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318758
> > Reviewed-by: Adlai Holler <adlai@google.com>
> > Commit-Queue: Adlai Holler <adlai@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
>
>
> Change-Id: Id4b10795193a904cd4ed8c36e60e74abe3b6702a
> Docs-Preview: https://skia.org/?cl=318759
> Cq-Include-Trybots: luci.skia.skia.primary:Build-Mac10.15.5-Clang-arm64-Debug-iOS_Metal,Build-Mac-Clang-x86_64-Debug-Metal
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318759
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Adlai Holler <adlai@google.com>

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

Change-Id: Ib20fe933120d56b72efaec73a0bedec60bc28def
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319184
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-09-24 11:44:49 +00:00
Adlai Holler
ff13ffbeac Reland "Take GrContext private, GrDDLContext inherit from GrRecordingContext"
This reverts commit 89bdc90ac8.

Reason for revert: Fix metal

Original change's description:
> Revert "Take GrContext private, GrDDLContext inherit from GrRecordingContext"
>
> This reverts commit d2daa94ede.
>
> Reason for revert: Metaru
>
> Original change's description:
> > Take GrContext private, GrDDLContext inherit from GrRecordingContext
> >
> > Woo!
> >
> > Change-Id: I8d201b709343dc18cad31ea740575285dd035f35
> > Docs-Preview: https://skia.org/?cl=317436
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317436
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Adlai Holler <adlai@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
>
> Change-Id: I9b58dee285fbdc49ebc8e76df5da0fe224cf9787
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318758
> Reviewed-by: Adlai Holler <adlai@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>

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


Change-Id: Id4b10795193a904cd4ed8c36e60e74abe3b6702a
Docs-Preview: https://skia.org/?cl=318759
Cq-Include-Trybots: luci.skia.skia.primary:Build-Mac10.15.5-Clang-arm64-Debug-iOS_Metal,Build-Mac-Clang-x86_64-Debug-Metal
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318759
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-09-23 21:17:47 +00:00
Adlai Holler
7b97b3cb2b Reland "Migrate metal tools away from GrContext"
This reverts commit 18f4b1c7e3.

Reason for revert: Fixed iOS

Original change's description:
> Revert "Migrate metal tools away from GrContext"
>
> This reverts commit 3eb813e0cc.
>
> Reason for revert: Broke iOS
>
> Original change's description:
> > Migrate metal tools away from GrContext
> >
> > Change-Id: I73a73ca5d088c35acd23be3336d8d1e3e859a82e
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318760
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> > Auto-Submit: Adlai Holler <adlai@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
>
> Change-Id: Idf74c936cfe8481e18455dcc0faa21155884b198
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319017
> Reviewed-by: Adlai Holler <adlai@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>

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


Change-Id: I6e14a333be4a960af0434bbcb6ce9a1a2271dca6
Cq-Include-Trybots: luci.skia.skia.primary:Build-Mac-Clang-arm64-Debug-iOS_Metal,Test-iOS-Clang-iPhone11-GPU-AppleA13-arm64-Debug-All-Metal,Test-Mac10.13-Clang-MacBook10.1-GPU-IntelHD615-x86_64-Debug-All-Metal,Test-Mac10.13-Clang-MacBook10.1-GPU-IntelHD615-x86_64-Debug-All-DDL3_Metal
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319018
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-09-23 19:11:07 +00:00
Adlai Holler
89bdc90ac8 Revert "Take GrContext private, GrDDLContext inherit from GrRecordingContext"
This reverts commit d2daa94ede.

Reason for revert: Metaru

Original change's description:
> Take GrContext private, GrDDLContext inherit from GrRecordingContext
> 
> Woo!
> 
> Change-Id: I8d201b709343dc18cad31ea740575285dd035f35
> Docs-Preview: https://skia.org/?cl=317436
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317436
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>

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

Change-Id: I9b58dee285fbdc49ebc8e76df5da0fe224cf9787
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318758
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-09-22 20:50:01 +00:00
Adlai Holler
d2daa94ede Take GrContext private, GrDDLContext inherit from GrRecordingContext
Woo!

Change-Id: I8d201b709343dc18cad31ea740575285dd035f35
Docs-Preview: https://skia.org/?cl=317436
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317436
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-09-22 20:03:19 +00:00
Nathaniel Nifong
f4858d31a4 Add a define causing debugger to use an older clip feature
Change-Id: I4d7354f7afaa69866f60863b5e875f4a61373a45
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317612
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-09-18 15:24:37 +00:00
Nathaniel Nifong
0b448daafb Add a method of returning the list of commands that use an image
Change-Id: I3c94f7b6faa71ab0cbeccddd2032b657e350c9b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316843
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-09-16 15:57:40 +00:00
Brian Salomon
c2a9a9716e New version of SkImage::MakeFromYUVAPixmaps()
Takes SkYUVAPixmaps. Still implemented in terms of SkYUVAIndex[4]
internally.

Replace all internal use cases except wacky_yuv_formats.

Takes GrRecordingContext rather than GrContext.

SkVideoDecoder updated to take GrRecordingContext.

Bug: skia:10632

Change-Id: I6e9b9b6a4f11333bce6f87c1ebff0acb297f6540
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316837
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-09-15 16:13:50 +00:00
John Stiles
7571f9e490 Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'.
Mechanically updated via Xcode "Replace Regular Expression":

  typedef (.*) INHERITED;
    -->
  using INHERITED = $1;

The ClangTidy approach generated an even larger CL which would have
required a significant amount of hand-tweaking to be usable.

Change-Id: I671dc9d9efdf6d60151325c8d4d13fad7e10a15b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314999
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-03 03:41:26 +00:00
Nathaniel Nifong
0f7aa54e43 Fix GL loading bug in wasm debugger.
Seems this was fixed in canvaskit, but overlooked in debugger.

Change-Id: I326b809628a8531a521a6246e65798d37dcce1b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314457
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-09-02 20:20:15 +00:00
Mike Reed
58cc97a11f Use factories to avoid using (deprecated) path editing methods
Change-Id: Iae9944f6bba5a91c4643b3c3745c4c352bd07a17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/312845
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-24 19:53:13 +00:00
Nathaniel Nifong
642a10b1f2 Add origin visualization, add support for Concat44
bug:skia:10211

Change-Id: Ia1a6da784096c1e655ec6198206de879ffbb556b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/311605
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-08-20 17:49:32 +00:00
Kevin Lubick
157577b866 [canvaskit,pathkit] Update to emsdk 2.0
There was a break that was solved by adding -lGL to our link
steps. I discovered a few extra flags to aid in debugging builds
and I've left those in (they aren't too noisy IMO).

This changes the base dockerfile to use the official emscripten one.

Code size delta for full build is +5 kb

For future reference, emsdk decides which "library JS" files to
pull in using a83ba99d60/tools/building.py (L1553)
Those JS files live in src (e.g. a83ba99d60/src/library_html5_webgl.js (L222))
and define functions that the C++ code can call.

I'd like to follow-up on what -lEGL is doing.

Also, since the new image no longer has depot_tools, we need
to make docker/skia-wasm-release/Dockerfile install it.

Change-Id: I5a38e61e5080e9c4cb1e0a7e031509bcb107ff86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/311726
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-08-20 14:55:50 +00:00
Mike Klein
853d4ed2ff Revert "remove sksl interpreter guards"
This reverts commit 7f1117e886.

Reason for revert: Seems like Clang gets stuck allocating registers on ARM,

[2477/38027] CXX obj/skia/skia/SkSLByteCode.o
FAILED: obj/skia/skia/SkSLByteCode.o
/b/s/w/ir/cache/goma/client/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF...(too long)
fatal error: error in backend: Error while trying to spill LR from class GPR: Cannot scavenge register without an emergency spill slot!
PLEASE submit a bug report to https://crbug.com and run tools/clang/scripts/process_crashreports.py (only works inside Google) which will upload a report and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/skia/ski...(too long)


Original change's description:
> remove sksl interpreter guards
> 
> This is only used by particles, benchmarks, and tests,
> and should be swept away by dead code elimination otherwise.
> 
> Change-Id: I10462d6ae0a08dd8219fc49325160ec6790632af
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/311759
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

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

Change-Id: I1b6370d39285210267425f090235a4d80aebe4fa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/312034
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-20 00:41:15 +00:00
Mike Klein
7f1117e886 remove sksl interpreter guards
This is only used by particles, benchmarks, and tests,
and should be swept away by dead code elimination otherwise.

Change-Id: I10462d6ae0a08dd8219fc49325160ec6790632af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/311759
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-19 14:44:09 +00:00
John Stiles
a008b0fa8b Enable ClangTidy check readability-redundant-smartptr-get.
To my surprise, this even works with homegrown smart pointers (such as
SkTLazy).

https://clang.llvm.org/extra/clang-tidy/checks/readability-redundant-smartptr-get.html

Find and remove redundant calls to smart pointer’s .get() method.

Examples:

  ptr.get()->Foo()  ==>  ptr->Foo()
  *ptr.get()  ==>  *ptr
  *ptr->get()  ==>  **ptr
  if (ptr.get() == nullptr) ... => if (ptr == nullptr) ...

Change-Id: I8ff541e0229656b4d8e875c8053a7e6138302547
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310976
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-16 15:56:48 +00:00
Nathaniel Nifong
00bb722628 missed minification bug
Check SKP file version, return error string to JS caller

Change-Id: I063920259e3ead102a4c7173d7015ff98992bbf2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310338
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-08-14 17:06:05 +00:00
Nathaniel Nifong
17fd901d93 Check SKP file version, return error string to JS caller
bug:skia:10579

Change-Id: I1419febc4846e33bce293e14a4666337d7965305
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310108
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-08-14 15:14:47 +00:00
John Stiles
a6841be235 Enable ClangTidy check llvm-namespace-comment.
This fixes a large number of SkSL namespaces which were labeled as if
they were anonymous, and also a handful of other mislabeled namespaces.
Missing namespace-end comments have been added throughout.
A number of diffs are just indentation-related (adjusting 1- or 3-
space indents to 2-space).

Change-Id: I6c62052a0d3aea4ae12ca07e0c2a8587b2fce4ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308503
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-06 19:07:52 +00:00
Mike Reed
093de4eb2c Use more of pathbuilder
Bug: skia:9000
Change-Id: Ia5c16ffbaeebbdd027c692c96095cfa181030d35
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307702
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-03 21:04:55 +00:00
Leon Scroggins III
577536aa1a Remove "dummy" to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 162536543
Change-Id: I40df639e2f42da6d99d897a02cf05aecff682061
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307226
Auto-Submit: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2020-07-31 19:11:23 +00:00
Leon Scroggins III
487d9d1908 Remove experimental/Networking code
Bug: chromium:1101491
Bug: b/161896447

The motivation here was to remove uses of the word "master". But this
code is in experimental/, and it doesn't look to be used (based on
code searches in Chromium, Android, and Google3). The last meaningful
changes were in 2011; other changes have just been upkeep.

Change-Id: I5993402008877ec8c12c0bca4cf09c02dc6de9ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305965
Auto-Submit: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-28 13:25:27 +00:00
Florin Malita
b1ee2c4961 Bump SkottieKit version
Change-Id: Ie1d35c97a858f7cf6bf6e052ab9c1cffeaee24c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305969
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-07-27 18:03:55 +00:00
Florin Malita
522fd1e551 Fix SkottieKit font loading
The current build configuration (empty fontmgr) doesn't support loading
custom fonts.

For full/npm builds, use the custom fontmgr.

Change-Id: Ifd623fdbac2d5723a04add6fc455188fb3dc96e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305816
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
2020-07-27 11:33:40 +00:00
Brian Salomon
d007281c9a Fix clang 12 Wsuggest-override and Wsuggest-destructor-override
Change-Id: Ic44e24057b95bb014504f02a736fb4341afc8971
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304856
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-22 01:11:36 +00:00
Kevin Lubick
12281c56fb [skottiekit] Initial npm files
As per convention, skottiekit/skottiekit is the folder that
will be published to npm. It has a bin directory that has the
full skottiekit build.

Change-Id: I95cbb80158bc8e6dbe3b0d8ae4ffcadd59a7bf9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303925
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-07-21 14:23:07 +00:00
Florin Malita
aaf945c2fc Add a full build option for SkottieKit
Change-Id: Iff6863bfb243a28b83455b72936f4b168572f7a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299679
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-06-29 18:48:14 +00:00
Florin Malita
836c9d83aa [skrive] Rectangle support
... plus assorted fixes

TBR=
Change-Id: Idd4432eecd910b79e25418cef6247888ec1ade5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299283
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-06-26 15:12:00 +00:00
Florin Malita
3d273d0034 [skrive] Initial render plumbing
TBR=
Change-Id: I425463c2f6cf4eda510ec573517472e10bdedb68
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299137
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-06-25 17:27:06 +00:00
Florin Malita
a3b0b30a78 [skrive] Parse ellipse data
TBR=
Change-Id: I76b4cd1639bee648630a841164045f8b9693af49
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298560
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-06-24 02:17:30 +00:00
Florin Malita
2106373889 [skrive] Parse color paints
TBR=
Change-Id: I86f335c57e867db7a181b86b77b4824dfc776fa4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298220
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-06-23 12:27:23 +00:00
Florin Malita
579e63af00 [skrive] Reset the node system
Tacking another hierarchy on top of SkSG doesn't work well.

Let's start fresh.

TBR=
Change-Id: Ieb379b57e1a77df3c62048d3be7e81e1429f9b23
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297807
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-06-19 20:00:55 +00:00
Bryce Thomas
88ecb7f580 Add sleep option to web_to_(skp|mskp) shell scripts.
On slower machines, invoking |chrome.gpuBenchmarking.printToSkPicture|
too early after the headless browser is launched leads to no .skp
files being captured.  Adding a sleep after the launch of the headless
browser rectifies the issue.

Bug: NONE
Change-Id: I39178f8336b794a6f293bd337aca0b6f85a07360
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297805
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-06-19 19:06:29 +00:00
Florin Malita
c217f61764 [skrive] Start parsing the node hierarchy
TBR=
Change-Id: I601ad831e69fd26ac8a0fe1f90ce2e9588a7f912
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297056
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-06-18 19:29:42 +00:00
Ben Wagner
588b32c04e Update debugger to new fontmgr selection.
With commit 75626e4 "Regularize selection of fontmgr." the skottiekit
and convaskit compile.sh files were updated, but the wasm-skp-debugger
one was overlooked. This will lead to selection of the empty fontmgr
which cannot load fonts.

Change-Id: I8c3090866f27d42a0f1fcf74e3209298d7cb0af5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296722
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-06-17 19:31:28 +00:00
Florin Malita
1da2556a09 [skrive] Initial binary reader plumbing
TBR=
Change-Id: Ib94516bfba881fd3fdd7b09631f14366f6ac98da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295573
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-06-11 17:24:25 +00:00
Ben Wagner
75626e4b1a Regularize selection of fontmgr.
Change-Id: Id7c51504450c1c7c9421eba3838bd6bc3440ca4f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295437
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-06-11 12:28:03 +00:00
Florin Malita
45cd20004c [skrive] Initial artboard plumbing
"Artboards" are top-level Rive containers (similar to AE compositions),
holding the scene graphics and related animations.

Artboard properties:

  - name
  - width/height (size)
  - translation (position)
  - origin (anchor point for transforms?)
  - (background) color
  - clip contents flag

Plumb artboard parsing + background rendering, and hook into viewer.

TBR=
Change-Id: Ib188245ce41a76197cf9e0937689adf8243826d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295244
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-06-09 19:58:38 +00:00
Mike Klein
45f36b5b55 ignore SK_DISABLE_READBUFFER
Its effect is small and we want to rely on SkReadBuffer being available.

Size changes:

    - canvaskit uncompressed: 6,864,481 --> 6,864,481  (  no change  )
    - canvaskit   compressed: 2,667,117 --> 2,667,117  (  no change  )
    -   pathkit uncompressed:   329,187 -->   330,679  (+ 1.5K, +0.5%)
    -   pathkit   compressed:   134,158 -->   134,672  (+ 0.5K, +0.4%)
    -   flutter             : 1,302,108 --> 1,322,568  (+20.0K, +1.6%)

The Flutter change is the biggest mystery, as bloaty only pegs
SkReadBuffer as 3.9K.  The rest must come from other files including
SkReadBuffer.h not being able to see and inline away SkReadBuffer
routines?  Feels like SK_DISABLE_EFFECT_DESERIALIZATION isn't trimming
enough?

PS 4-6 have an idea to push SK_DISABLE_EFFECT_DESERIALIZATION further.

Change-Id: Ifda3ccb82dd0636cfed6bb826fb185a7bca2cbe0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295061
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-06-09 16:16:57 +00:00
Florin Malita
26ae40f668 Reland "[skrive] Initial parser plumbing"
This reverts commit e923ae1be4.


Original change's description:
> Revert "[skrive] Initial parser plumbing"
> 
> This reverts commit 00a96f2c99.
> 
> Reason for revert: breaking wuffs 
> 
> Original change's description:
> > [skrive] Initial parser plumbing
> > 
> > TBR=
> > Change-Id: If96d81840b5bb3bc8c6e26f8aacca4d9dd8896e3
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293677
> > Reviewed-by: Florin Malita <fmalita@chromium.org>
> > Commit-Queue: Florin Malita <fmalita@chromium.org>
> 
> TBR=fmalita@chromium.org,reed@google.com
> 
> Change-Id: I63258d560cc8ee8d069e6417d987342a74a3f0c2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295001
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Florin Malita <fmalita@chromium.org>

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

# Not skipping CQ checks because this is a reland.

Change-Id: I0a671bb7476ee92c365fbea1f156c73c6954fe40
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295003
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-06-08 16:38:59 +00:00
Florin Malita
e923ae1be4 Revert "[skrive] Initial parser plumbing"
This reverts commit 00a96f2c99.

Reason for revert: breaking wuffs 

Original change's description:
> [skrive] Initial parser plumbing
> 
> TBR=
> Change-Id: If96d81840b5bb3bc8c6e26f8aacca4d9dd8896e3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293677
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Florin Malita <fmalita@chromium.org>

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

Change-Id: I63258d560cc8ee8d069e6417d987342a74a3f0c2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295001
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-06-08 15:22:15 +00:00
Florin Malita
00a96f2c99 [skrive] Initial parser plumbing
TBR=
Change-Id: If96d81840b5bb3bc8c6e26f8aacca4d9dd8896e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293677
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-06-08 14:23:34 +00:00
Nathaniel Nifong
6c6592c338 Upgrade to emscripten 1.39.16
Change-Id: I9717aee8b94fefe77c6edc2566faea68e1fac430
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291337
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-05-21 18:31:21 +00:00
Mike Reed
1f60733fb3 Revert "Revert "move onto new factories for SkMatrix""
This reverts commit c80ee456ad.

fix: update flutter's gn file to add guard

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

Reason for revert: need to update/guard flutter

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

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

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

Change-Id: Id77ab1cf6b1cab35087a7c56000750912cf47383
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290831
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-05-21 15:04:09 +00:00
Kevin Lubick
4ad6b50df3 [canvaskit] Fix some other usages of .ready
Leftover from https://skia-review.googlesource.com/c/skia/+/291182

Change-Id: I7350839d43299846e9e9cbc58425013eb063b041
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291356
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-05-21 14:52:53 +00:00
Greg Daniel
49de1031d4 Reland "Remove deprecated flush calls."
This reverts commit 5e6d789ce4.

Reason for revert: Relanding with fix landed in chrome

Original change's description:
> Revert "Remove deprecated flush calls."
> 
> This reverts commit d8fd0bf574.
> 
> Reason for revert: chrome roll
> 
> Original change's description:
> > Remove deprecated flush calls.
> > 
> > Bug: skia:10118
> > Change-Id: I13758b5416784c296b8b5be9f3228230ac1be05f
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290540
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com
> 
> Change-Id: I49d35cdb258e632f645974c5ec62075d3392efe0
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:10118
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290834
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

# Not skipping CQ checks because this is a reland.

Bug: skia:10118
Change-Id: Ie24d7845a4ad75f95afe59037ea80a9f38082f13
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290918
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-05-20 15:48:46 +00:00
Greg Daniel
0f16c57cb0 Revert "Fix flush change breaks."
This reverts commit 61d0084461.

Reason for revert: reverting base change for chrome roll

Original change's description:
> Fix flush change breaks.
> 
> Change-Id: I5b61e2939f08b42d1fef457f73631b7bf5a4f933
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290824
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Auto-Submit: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

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

Change-Id: I4ae13414226f2532fcfd81236c2b857000fa4c6b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290833
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-05-19 20:56:39 +00:00
Greg Daniel
61d0084461 Fix flush change breaks.
Change-Id: I5b61e2939f08b42d1fef457f73631b7bf5a4f933
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290824
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-05-19 19:26:05 +00:00
Tyler Freeman
c9911527d2 Added setNodeAttribute to SkSVGDom
Change-Id: Ib96c185aab9167116d20ca8d91a1703683cbf7dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288620
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-05-08 21:08:12 +00:00
Nathaniel Nifong
92e12b856f Remove libgifcodec from skottiekit build.
GIF decoding is not needed, saves another 5.5k on the brotli compressed binary

Change-Id: I4bc5f3e7bed83c190a73cb19dfb59f89fcc76cd8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285826
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-04-29 18:08:46 +00:00
Kevin Lubick
3088c69b5f [skottiekit] Add a proof-of-concept only Skottie WASM build.
The goal is to see how small this can be w/o disrupting
CanvasKit.

Change-Id: Ia96ebf94dbe335d9db481d9264279163f8c37e16
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285012
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-04-27 14:28:20 +00:00
Florin Malita
123e3b893f [skottie/tools] Video playback support
Implement a VideoAsset wrapper, used for Skottie video layers.  This
requires a non-testlib build target for SkVideoDecoder, hence a
dedicated BUILD.gn.

Add software conversion fallback for SkVideoDecoder, using libswscale.

Change-Id: I80dd555a1241081e50ee4834b64ad3518948a0f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285378
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-04-24 15:56:50 +00:00
Tyler Freeman
e9663db508 SVG: Added font-size and font-weight attributes to Text node
Change-Id: Ic929cb0119aefae490110648df6e9ea57700c6db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281838
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-04-22 01:24:03 +00:00
Tyler Denniston
df1b014005 [svg] Reapply currentColor to fill/stroke
For the scenario in color-prop-05-t:
  <g fill="currentColor" color="lime">
    <rect x="120" y="60" width="150" height="150" color="red"/>
  </g>
(rectangle should be rendered red according to CSS spec)

The sequence of events is:
  <g>
    - fInherited.fColor = lime
    - fInherited.fFill = kCurrentColor
    - commit fFill to paint (paint.setColor(lime))
    <rect>
      - fInherited.fColor = red
      - BUG: fFill not re-committed to paint because it is 'inherit'

This CL fixes the bug by recommitting to the fill and stroke paint
if the fill/stroke attribute values are currentColor.

Change-Id: Icecd498eb0122513e0241740536e239eed335ef3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284377
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-04-20 16:39:31 +00:00
Tyler Denniston
2d65b73337 [svg] Fix multiple transforms specified
The transform attribute can accept a comma-wsp separated list of
transformations. Relevant test is coords-transformattr-01-f.

Change-Id: I22dd4b65dc4922d9f5b0ca168cd1fc38fca30ec8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283777
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-04-16 13:39:30 +00:00
Tyler Denniston
a625f9250c [svg] Fix translate() with no ty specified.
No specified ty should be treated as 0. Test is coords-trans-12-f.

Change-Id: I5a3d0299e59933139b0ca77ebf797080b7ddaa1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283776
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-04-15 20:36:06 +00:00
Tyler Denniston
8ac25c44cb [svg] Improve color value parsing
- Accept fractional rgb(...) component values (CSS2 spec). Related test
  is color-prop-02-f.
- Don't set fCurPos to null when parsing fails.

Change-Id: I3acbd5dfd98c9ff61ba53f3695a32800b1575944
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283643
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-04-15 20:08:37 +00:00
Tyler Denniston
308c07212a [svg] Implement currentColor for gradient stops
Required introducing a new type for stop-color attribute. A test that
exercises this is 'color-prop-01-b'.

Note that stop-color should be an inherited presentation attribute, but
that is not addressed in this CL.

Change-Id: I65b99bfc989f1d4b5a0746de31011b0e72eb6c59
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282592
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-04-14 16:20:44 +00:00
Florin Malita
f4403e7a78 Revert "[SVG] Replace custom attribute value wrappers with std::variant"
This reverts commit 97e0861b67.

Reason for revert: not all builders support C++17 STL

Original change's description:
> [SVG] Replace custom attribute value wrappers with std::variant
> 
> Less boilerplate, more STL.
> 
> Change-Id: I601f75877d60085cbf3d39f401543fbe9c086f90
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282836
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>

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

Change-Id: If5816f11e9cf85dcec2452229c5675037303b220
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282847
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-04-10 14:14:22 +00:00
Florin Malita
97e0861b67 [SVG] Replace custom attribute value wrappers with std::variant
Less boilerplate, more STL.

Change-Id: I601f75877d60085cbf3d39f401543fbe9c086f90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282836
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-04-10 13:35:53 +00:00
Florin Malita
a362669e1c [svg] Remove primitive type wrappers
SkSVGPrimitiveTypeWrapper must have served some purpose in the past
(maybe? I have no memory of this place :P), but now it basically does
templated-nothing.

Well...

Change-Id: Id93487c345ea075d09b14024f4bcd2f987789518
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282680
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-04-09 19:06:36 +00:00
Tyler Denniston
6c8314efa1 [SVG] Implement currentColor for fill and stroke
The 'color' presentation attribute when set determines the value of the
special color value 'currentColor'. See the color-prop-01-b test for an
example.

Not handled in this CL:
- The color type needs to be changed to be inheritable.
- currentColor should also be usable for stop-color for gradients. See
  <https://www.w3.org/TR/SVG11/color.html#ColorProperty> for a full list
  of attributes that can use currentColor.

Change-Id: Icf81b5313cda688d1b6e20809b9b339f517b9ada
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282638
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-04-09 18:48:16 +00:00
Florin Malita
0929425f3d [svg] Skip "inherited" presentation attributes
Instead of propagating and attempting to handle at resolution time,
cull "inherited" values in the setters - for inherited-by-default
presentation attributes, "inherited" is the same as not specifying
a property.

Also add some missing setters for more consistent dispatching, and
assert that kInherited never shows up in computed values.

Change-Id: Iceeab4440c5c2eee18a144e2a32704fd29ec5e95
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282396
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-04-09 13:34:45 +00:00
Tyler Denniston
b96bb97f09 [SVG] Fix polyline/polygon point parsing
This was evident in the 'shapes-polygon-01-t' SVG.

Change-Id: I4900b9e3626b924291c569a6611fb3b280e3219c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282397
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-04-09 12:20:29 +00:00
Florin Malita
5076bd228f [svg] Fix dasharray padding
Use a correct byte count (instead of SkScalar count).

Change-Id: I1b7d38031eacecbb18bf3453998913da68af5a4a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282480
Auto-Submit: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2020-04-09 12:15:24 +00:00
Florin Malita
27aeb12d47 [svg] Reference cycle avoidance
Several SVG constructs reference other elements based on their ID (e.g.
<use>).  This can yield arbitrary reference chains and cycles.

Since all ID-based lookups are funneled through
SkSVGRenderContext::findNodeById(), a straightforward method to break
cycles is to temporarily clear the id->node association following a
lookup -- where "temporarily" refers to the local execution scope.

This approach works for all recursive traversals, as scopes are
nested/released in a natural manner.

  - introduce a scoped node reference wrapper (BorrowedNode), which
    clears the id mapping for its lifetime and restores it upon
    destruction
  - update findNodeById() return BorrowedNode values
  - update call sites as needed

Change-Id: I2ec5539b24e23b4fbbaff01a44460c41190028e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282271
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2020-04-08 20:04:17 +00:00
Tyler Denniston
d1e5b030fd [SVG] Fix application of skewX/skewY attributes
The SkMatrix setSkew functions set the matrix value directly, so we need
to treat the angle according to
https://www.w3.org/TR/SVG11/coords.html#SkewXDefined

Change-Id: I3a47e4e98724ef71f39a00dc2f07c8bf430de747
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282268
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Tyler Denniston <tdenniston@google.com>
2020-04-08 19:51:47 +00:00
Florin Malita
f005c25684 [SVG] Fix spec links
Lock to SVG 1.1, where they were originally pointing.

Change-Id: I9c770983137375f1daa84a2d0927b5e44f93e7b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282264
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2020-04-08 15:48:08 +00:00
Mike Klein
a01c6b0b59 reformat GN files
Change-Id: I2d19c4f0ff1439dcd923a3064eb3ba78432a5113
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281043
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-04-01 23:23:03 +00:00
Xavier Phan
e29cdaf4c1 Add experimental support for svg text tag.
Change-Id: Ied72850ec98d5fe6d4263d91cb1dd89bd58b5ad1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274796
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2020-03-27 13:56:49 +00:00
Brian Salomon
f4ba4ec796 Revert "Revert "Revert "Revert "Don't build GL on Metal, Vulkan, Dawn, Direct3D bots""""
Updated to use sentinel GL context even when GL backend is not built.

This reverts commit 1171d314ef.

Change-Id: Ia94bbe4865ddd4e898446c13886877c539f0eb0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277976
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-20 17:11:58 +00:00
Brian Salomon
1171d314ef Revert "Revert "Revert "Don't build GL on Metal, Vulkan, Dawn, Direct3D bots"""
This reverts commit fb27c9a25f.

Revert "Remove MoltenVK support"

Reason: TSAN Vulkan bots hanging.

This reverts commit 6cafe73da9.

Change-Id: I8ec9db35c112f3c8da8636dab2065e6f18de7d0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277936
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-19 13:10:59 +00:00
Brian Salomon
fb27c9a25f Revert "Revert "Don't build GL on Metal, Vulkan, Dawn, Direct3D bots""
This reverts commit 00ba5ef4a6.

Bug: skia:10051

Change-Id: I13fd5494b7e7e64159e6330f168ab8c16a2db149
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277609
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-03-18 18:12:11 +00:00
Brian Salomon
00ba5ef4a6 Revert "Don't build GL on Metal, Vulkan, Dawn, Direct3D bots"
This reverts commit f6784a8c84.

Reason for revert: breakage of builds

Original change's description:
> Don't build GL on Metal, Vulkan, Dawn, Direct3D bots
> 
> Misc fixes to omit GL-dependent targets and fix assumptions that
> SK_SUPPORT_GPU implies SK_GL.
> 
> Bug: skia:10051
> Change-Id: Ida88ac3f1bf4d9e23f66d0700c2bce18b938ed6f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277456
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: I4e02f675fd8820ed3c8efee192c64e570a23c3e5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10051
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277601
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-18 14:42:28 +00:00
Brian Salomon
f6784a8c84 Don't build GL on Metal, Vulkan, Dawn, Direct3D bots
Misc fixes to omit GL-dependent targets and fix assumptions that
SK_SUPPORT_GPU implies SK_GL.

Bug: skia:10051
Change-Id: Ida88ac3f1bf4d9e23f66d0700c2bce18b938ed6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277456
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-03-18 14:26:28 +00:00
Leon Scroggins III
a77f30c7db Reland "Split building encoding from decoding"
This reverts commit 9d4b788807.
Copyright issue has been fixed in
https://skia-review.googlesource.com/c/skia/+/275998.

Original description:
Bug: skia:9756

In CanvasKit, a large part of the binary is for encoding. Clients
would be happier with a smaller binary and no webp/jpeg encoding. Make
this an option by splitting up the GN arguments.

Split SK_HAS_WEBP_LIBRARY into SK_CODEC_DECODES_WEBP (to match the
existing SK_CODEC_DECODES_RAW) and SK_ENCODE_WEBP. Same for JPEG and
PNG.

Update CanvasKit compile script to disable webp and jpeg encoding.
Update debugger compile script to disable all encoding.

Change IsPng signature to match other SkCodecs.

TBR=djsollen@google.com

Change-Id: Ic847bae0154e0a2922100b3f2ee14a077ee5635a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276007
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2020-03-09 20:21:19 +00:00
Mike Klein
9d4b788807 Revert "Split building encoding from decoding"
This reverts commit 94aaf7cdf5.

Reason for revert: you know what I already typed the reason stop making rules that people have to follow, robots.

Original change's description:
> Split building encoding from decoding
> 
> Bug: skia:9756
> 
> In CanvasKit, a large part of the binary is for encoding. Clients
> would be happier with a smaller binary and no webp/jpeg encoding. Make
> this an option by splitting up the GN arguments.
> 
> Split SK_HAS_WEBP_LIBRARY into SK_CODEC_DECODES_WEBP (to match the
> existing SK_CODEC_DECODES_RAW) and SK_ENCODE_WEBP. Same for JPEG and
> PNG.
> 
> Update CanvasKit compile script to disable webp and jpeg encoding.
> Update debugger compile script to disable all encoding.
> 
> Change IsPng signature to match other SkCodecs.
> 
> Change-Id: Iec8466ee1b76bc3d1e377c24201068b776cd7718
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273768
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Nathaniel Nifong <nifong@google.com>

TBR=djsollen@google.com,scroggo@google.com,kjlubick@google.com,nifong@google.com

Change-Id: I4fc2ea916743fda7e7d0d668b59e52052e880104
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9756
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275710
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-06 21:39:21 +00:00
Leon Scroggins III
94aaf7cdf5 Split building encoding from decoding
Bug: skia:9756

In CanvasKit, a large part of the binary is for encoding. Clients
would be happier with a smaller binary and no webp/jpeg encoding. Make
this an option by splitting up the GN arguments.

Split SK_HAS_WEBP_LIBRARY into SK_CODEC_DECODES_WEBP (to match the
existing SK_CODEC_DECODES_RAW) and SK_ENCODE_WEBP. Same for JPEG and
PNG.

Update CanvasKit compile script to disable webp and jpeg encoding.
Update debugger compile script to disable all encoding.

Change IsPng signature to match other SkCodecs.

Change-Id: Iec8466ee1b76bc3d1e377c24201068b776cd7718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273768
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-03-06 18:50:40 +00:00
Brian Osman
788b91678f Remove SkTMin and SkTMax
Use std::min and std::max everywhere.

SkTPin still exists. We can't use std::clamp yet, and even when
we can, it has undefined behavior with NaN. SkTPin is written
to ensure that we return a value in the [lo, hi] range.

Change-Id: I506852a36e024ae405358d5078a872e2c77fa71e
Docs-Preview: https://skia.org/?cl=269357
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269357
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-07 18:40:09 +00:00
Hal Canary
9d9312b308 decs/examples: Support more fiddle types: offscreen, srgb
Change-Id: I606eb7dfbce04147bfc6e287bb2c75051a44a076
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264692
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2020-01-30 16:31:58 +00:00
Nathaniel Nifong
d0a0c59c80 Return summaries of all layers for display
Bug: skia:9752
Change-Id: I1012f4cda1c28d446269f0a3f212ccf80f17c194
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267439
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-01-29 20:55:49 +00:00
Kevin Lubick
0f4cb09320 [debugger] Use correct archiver
This will allow usage of emscripten 1.39.6 to build

Change-Id: I089f47fa4fa38bf55c5071f5d711856c8ab422b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267080
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-01-28 19:51:18 +00:00
Kevin Lubick
e17862a71e Fix wasm builds
After the update to emscripten 1.39.6, source maps don't
work on ASMJS builds and debugger needed the same change
of the default MAIN_MODULE setting as canvaskit and pathkit.

Change-Id: Ifb920dee998ae41fd500adca587b1ad20cfef584
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267076
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-01-28 19:03:49 +00:00
Nathaniel Nifong
4e0a6a96ea Fix compilation settings for wasm debugger
Change-Id: I08bbe9d0736be9b54cccdeee4896f0e2ab134302
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265140
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-01-17 20:44:13 +00:00
Hal Canary
8800042f69 docs/examples: REG_FIDDLE_ANIMATED
I also added the `get_examples.py` script which pulls down new fiddles.

Change-Id: I953e461685a4d118ac4e425453e47d665a485aa2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264570
Commit-Queue: Hal Canary <halcanary@skia.org>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2020-01-15 19:02:25 +00:00
Hal Canary
118df7cf62 skottie_ios_app: Add OpenGL.
- Consolidate Skottie logic into SkottieViewController class that no longer
    knows about which backend we use.

  - Abstract out SkiaViewController interdace which SkottieViewController
    implements.

  - Create three classes SkiaGLView, SkiaUIView, and SkiaMtkView, which all
    accept SkiaViewController objects but override GLKView, UIView, and
    MTKView.

  - SkAnimationDraw and SkTimeKeeper now SkiaViewController
    implementation details, no longer shared in headers.

Cq-Include-Trybots: skia/skia.primary:Build-Mac-Clang-arm64-Debug-iOS_Metal
Cq-Include-Trybots: skia/skia.primary:Build-Mac-Clang-arm64-Debug-iOS
Change-Id: I96ff2911d63da7d5327c81f91996b2a1b12c4419
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261178
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2020-01-14 16:16:32 +00:00
Nathaniel Nifong
12b2c27038 fix msan issue by init all new members
Change-Id: If90044b99e4d8e4be3366579518faa5abc96bd31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263706
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-01-14 14:52:37 +00:00
Nathaniel Nifong
ba80f359af Revert "Reland "Add vis of android device clip restriction, fix regular clip vis on gpu""
This reverts commit 17175f9ed9.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Reland "Add vis of android device clip restriction, fix regular clip vis on gpu"
> 
> This reverts commit 66f7ca63b1.
> 
> Reason for revert: Attempt initializing all new members
> 
> Original change's description:
> > Revert "Add vis of android device clip restriction, fix regular clip vis on gpu"
> > 
> > This reverts commit aac8e44d5c.
> > 
> > Reason for revert: Attempted fix didn't work, still producing red on tree.
> > 
> > Original change's description:
> > > Add vis of android device clip restriction, fix regular clip vis on gpu
> > > 
> > > Change-Id: I103025f4a9955c46f34b02d4e3ef1626796029e1
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263521
> > > Commit-Queue: Nathaniel Nifong <nifong@google.com>
> > > Reviewed-by: Kevin Lubick <kjlubick@google.com>
> > 
> > TBR=kjlubick@google.com,nifong@google.com
> > 
> > Change-Id: Ia1f3a53b829ceb15467da12a104d87d7b1e7dad9
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263697
> > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> > Commit-Queue: Jim Van Verth <jvanverth@google.com>
> 
> TBR=jvanverth@google.com,kjlubick@google.com,nifong@google.com
> 
> Change-Id: I5acc8a1f0b06e0490125077596d2c6366856d49c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263703
> Reviewed-by: Nathaniel Nifong <nifong@google.com>
> Commit-Queue: Nathaniel Nifong <nifong@google.com>

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

Change-Id: If19f5ceb60c83846baf417f898f57f9dfa2eb59d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263707
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-01-10 19:11:21 +00:00
Nathaniel Nifong
17175f9ed9 Reland "Add vis of android device clip restriction, fix regular clip vis on gpu"
This reverts commit 66f7ca63b1.

Reason for revert: Attempt initializing all new members

Original change's description:
> Revert "Add vis of android device clip restriction, fix regular clip vis on gpu"
> 
> This reverts commit aac8e44d5c.
> 
> Reason for revert: Attempted fix didn't work, still producing red on tree.
> 
> Original change's description:
> > Add vis of android device clip restriction, fix regular clip vis on gpu
> > 
> > Change-Id: I103025f4a9955c46f34b02d4e3ef1626796029e1
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263521
> > Commit-Queue: Nathaniel Nifong <nifong@google.com>
> > Reviewed-by: Kevin Lubick <kjlubick@google.com>
> 
> TBR=kjlubick@google.com,nifong@google.com
> 
> Change-Id: Ia1f3a53b829ceb15467da12a104d87d7b1e7dad9
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263697
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

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

Change-Id: I5acc8a1f0b06e0490125077596d2c6366856d49c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263703
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-01-10 19:04:11 +00:00
Jim Van Verth
66f7ca63b1 Revert "Add vis of android device clip restriction, fix regular clip vis on gpu"
This reverts commit aac8e44d5c.

Reason for revert: Attempted fix didn't work, still producing red on tree.

Original change's description:
> Add vis of android device clip restriction, fix regular clip vis on gpu
> 
> Change-Id: I103025f4a9955c46f34b02d4e3ef1626796029e1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263521
> Commit-Queue: Nathaniel Nifong <nifong@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>

TBR=kjlubick@google.com,nifong@google.com

Change-Id: Ia1f3a53b829ceb15467da12a104d87d7b1e7dad9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263697
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-01-10 17:57:41 +00:00
Nathaniel Nifong
aac8e44d5c Add vis of android device clip restriction, fix regular clip vis on gpu
Change-Id: I103025f4a9955c46f34b02d4e3ef1626796029e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263521
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-01-10 15:30:41 +00:00
Nathaniel Nifong
a14d809391 Support using an externally manage list of images in UrlDataManager for wasm debugger.
Bug: skia:9746
Change-Id: I07b5fe1f8f4250e29153b71ce2be106461f09928
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261998
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-01-03 21:25:12 +00:00
Nathaniel Nifong
94de6b40d9 Debugger changes to make layer inspection interactive
Change-Id: Ief4d8c2a90e8f459a64a3c07e97e16d2ef287bfa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260403
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-12-20 14:32:28 +00:00
Hal Canary
5d8b193868 fix build minimal_ios_mtl_skia_app
Change-Id: I9af324bec969a1f7feb84f8e5ea97b573c56694f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260396
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2019-12-16 19:44:36 +00:00
Hal Canary
efb4ed86cf SkMetalDeviceToGrContext: no longer needs any Skia headers
Also: mv experimental/skottie_ios tools/skottie_ios_app

Motivation:  make using SkMetalViewBridge that much easier for clients.

Change-Id: I985930ae0751d218e89c48c57b69d85ad7a1e703
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259279
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-12-16 18:09:40 +00:00
Petar Kirov
1ff585637a Fix small memory leak in c-api example
While working on creating bindings for dlang, I noticed that there was a
missing call to `sk_imageinfo_delete`, corresponding to the call to
`sk_imageinfo_new` in the c-api example. At first I thought that
`sk_surface_new_raster` (or something else) would free the image info
object internally, but after checking the implementation I saw this was
not the case.

This can be trivially verified with valgrind:

Before this change:
    $ valgrind ./skia-c-example 2>&1 | grep 'definitely lost'
    ==186215==    definitely lost: 24 bytes in 1 blocks

After:
    $ valgrind ./skia-c-example 2>&1 | grep 'definitely lost'
    ==185878==    definitely lost: 0 bytes in 0 blocks

Test: built and ran skia-c-example.c under valgrind
Change-Id: Ie3fba2e7602341d2f5e7dac198b3ec5923777cbd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260021
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-12-16 16:03:04 +00:00
Nathaniel Nifong
a072b7b275 Remove an uncessary and unused parameter for partially generating the JSON command list
All caller were passing the maxium value, those that weren't still function if they are made to.

Change-Id: Id9b5d8dbbbdf10a02ea0f3b21d500059ec383e3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259808
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-12-13 19:30:03 +00:00
Hal Canary
7e9defb06f BUILD.gn: Fix formatting.
Bug: skia:9713
Change-Id: Ief84ae139acd000b29adcf32e0aead2fbdbff166
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259536
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-12-12 18:03:46 +00:00
Nathaniel Nifong
20b177a9bf Parse android layer annotations in debugger, play back layers
Bug: skia:9626
Change-Id: I3ae8fa83520690f9af534e9ab0b70834d7890fb0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256100
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-12-12 16:32:44 +00:00
Nathaniel Nifong
c84ad83df8 Fix audit trail visualization bugs
Change-Id: Ib488f11980da110a03ca832203db4bc35c456887
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259417
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-12-11 23:07:05 +00:00
Hal Canary
2748306830 experimental/skottie_ios/SkottieUiView
skottie_ios builds either with or without Metal.  The SkAnimationDraw
and SkTimeKeeper classes help abstract out the common elements of the
UIView and the MTKView implementations.

Cq-Include-Trybots: skia/skia.primary:Build-Mac-Clang-arm-Debug-iOS
Cq-Include-Trybots: skia/skia.primary:Build-Mac-Clang-arm-Release-iOS
Cq-Include-Trybots: skia/skia.primary:Build-Mac-Clang-arm64-Debug-iOS
Cq-Include-Trybots: skia/skia.primary:Build-Mac-Clang-arm64-Debug-iOS_Metal
Cq-Include-Trybots: skia/skia.primary:Build-Mac-Clang-arm64-Release-iOS
Cq-Include-Trybots: skia/skia.primary:Build-Mac-Clang-arm64-Release-iOS_Metal
Cq-Include-Trybots: skia/skia.primary:Build-Mac-Clang-x64-Release-iOS
Change-Id: I2c5d217b6349188f32a81e013eb29c6254428831
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258636
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2019-12-11 23:02:00 +00:00
Nathaniel Nifong
732c49739f Return image address in image info so it can be shown in dropdown.
Note that I don't dereference this pointer, I'm just showing it to the user as it is currently
the only common identifier between the command list and the resource tab.

A longer term fix would be to show the resourse tab's indices in the command list. this is tougher
because it involves replacing UrlDataManager without breaking skiaserve.

Change-Id: Iaa0d60831e96128f19b6358e82b2e89f80444927
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258800
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2019-12-10 14:40:43 +00:00
Hal Canary
14629417cb experimental/skottie_ios: fix some objc errors
* Turns out that dealloc is unnecessary.  Some compilers
    give an error when it is there.

  * Use __bridge cast, since some compilers require it.

Cq-Include-Trybots: luci.skia.skia.primary:Build-Mac-Clang-arm64-Debug-iOS_Metal
Cq-Include-Trybots: luci.skia.skia.primary:Build-Mac-Clang-arm64-Release-iOS_Metal
Change-Id: I42d9ef16a5d6425c98a8a2b564bf4a06f26886f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257677
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2019-12-04 20:35:19 +00:00
Mike Reed
7d34dc7747 Revert "Revert "switch to new filltype for SkPath""
This reverts commit 3e7af41224.

Change-Id: Id4f66b3956f4bdbe690db20fc478b7365ee89717
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256676
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-11-26 17:43:14 +00:00
Mike Reed
3e7af41224 Revert "switch to new filltype for SkPath"
This reverts commit 3a50981a83.

Reason for revert: chrome win build found compile-problem in xpsdevice

Original change's description:
> switch to new filltype for SkPath
> 
> Change-Id: I7793324a9acf4afb0eb38c1e20fbb38eac25d636
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256102
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: Iacb3566da61c2512b9bd6b7e42b592febc85e031
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256530
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-11-26 03:34:30 +00:00
Mike Reed
3a50981a83 switch to new filltype for SkPath
Change-Id: I7793324a9acf4afb0eb38c1e20fbb38eac25d636
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256102
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-11-25 22:31:46 +00:00
Jim Van Verth
c910602376 Reland "Minimal iOS app: Perform present subsequent to flush"
This is a reland of 4e385e21a4

Original change's description:
> Minimal iOS app: Perform present subsequent to flush
> 
> Currently the backbuffer present is not on the same MTLCommandQueue
> as the flush from Skia, which probably means that it's happening
> concurrently. This can overwhelm the GPU. This CL submits the present
> to the same queue as the flush.
> 
> Change-Id: Ibaf805553931c9dc46368b362a2391425ae3e60e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248557
> Reviewed-by: Hal Canary <halcanary@skia.org>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

Change-Id: I118047630b8936838d5da8ef4307ad5c5e8d2ade
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248562
Reviewed-by: Hal Canary <halcanary@skia.org>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-10-14 18:32:37 +00:00
Jim Van Verth
41b41f9d31 Revert "Minimal iOS app: Perform present subsequent to flush"
This reverts commit 4e385e21a4.

Reason for revert: Causing issues with iOS Skottie app.

Original change's description:
> Minimal iOS app: Perform present subsequent to flush
> 
> Currently the backbuffer present is not on the same MTLCommandQueue
> as the flush from Skia, which probably means that it's happening
> concurrently. This can overwhelm the GPU. This CL submits the present
> to the same queue as the flush.
> 
> Change-Id: Ibaf805553931c9dc46368b362a2391425ae3e60e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248557
> Reviewed-by: Hal Canary <halcanary@skia.org>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

TBR=jvanverth@google.com,halcanary@google.com,halcanary@skia.org

Change-Id: I56a9f1f12ebceeb750948e459ff9f90e06b7b2e4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248561
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-10-14 16:39:00 +00:00
Jim Van Verth
4e385e21a4 Minimal iOS app: Perform present subsequent to flush
Currently the backbuffer present is not on the same MTLCommandQueue
as the flush from Skia, which probably means that it's happening
concurrently. This can overwhelm the GPU. This CL submits the present
to the same queue as the flush.

Change-Id: Ibaf805553931c9dc46368b362a2391425ae3e60e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248557
Reviewed-by: Hal Canary <halcanary@skia.org>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-10-14 15:30:49 +00:00
Kevin Lubick
957bf97414 [debugger] Use alternate buffer
Bug: skia:9524
Change-Id: I8268d1652f55516e009e3cf68b3322f37aa08933
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/247636
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2019-10-10 15:19:42 +00:00
Florin Malita
10e5257ec9 [SkVideoEncoder] Allow clients to control the color type
Change-Id: If57514c9e7e8d0a417eb9388873bbb348fc49076
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/247384
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-10-10 14:55:31 +00:00
Hal Canary
8c500751cd experimental/minimal_mtl_app: more cleanup
Try to keep a consistent style for objective-C++ code.

Also, share code between both apps.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Mac-Clang-arm64-Debug-iOS_Metal,Build-Mac-Clang-arm64-Release-iOS_Metal

Change-Id: I4b749780c81319bd048f4295c21dfa91910e262d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241042
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2019-10-01 14:40:55 +00:00
Hal Canary
a7914a8726 experimental/tools/pdf-comparison: delete worktree when it gets into a bad state
No-Try: true
Change-Id: I61f48fd32348d44a2c7e27d56e404f7876bed3ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245161
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-10-01 14:07:54 +00:00
Brian Salomon
4bc0c1fc4b Rename GrColorSpaceInfo -> GrColorInfo
Add version SkImageInfo::Make() that takes SkISize instead of separate
width and height.

Change-Id: I42aa79d23b19e22f5405631728c245b04bce0559
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245172
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-09-30 21:53:24 +00:00
Hal Canary
0846d68474 experimental/skottie_ios/SkottieMtkView: stopAtEnd option
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Mac-Clang-arm64-Debug-iOS_Metal,Build-Mac-Clang-arm64-Release-iOS_Metal

Change-Id: Ib8995992120e24563e44b07cf84a1bdead378105
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245157
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Auto-Submit: Hal Canary <halcanary@google.com>
2019-09-30 13:58:51 +00:00
Nathaniel Nifong
58b0a37942 Make move-assets obey SKIA_INFRA_ROOT
Change-Id: I8758f523427cff47f8b213ceb37077e5edc7767f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244196
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-09-27 17:48:35 +00:00
Hal Canary
988b1e4653 experimental/skottie_ios: Add methods to SkottieMtkView
- (void)seek:(float)seconds;
    - (float)animationDurationSeconds;
    - (float)currentTime;

Also: fix issue with finding json resources.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Mac-Clang-arm64-Debug-iOS_Metal,Build-Mac-Clang-arm64-Release-iOS_Metal

Change-Id: I19b45dd902b6119216f8c58ad8e13b9036a6b9c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244513
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-09-26 21:13:11 +00:00
Nathaniel Nifong
696933d8ba Add tests that loads mskp and changes frame.
Bug: skia:9462
Change-Id: I54141ffa4db7d5eb77e2e3d1b464ee540be3cd4d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244076
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2019-09-25 18:13:00 +00:00
Nathaniel Nifong
7b30b70299 Added functions supporting a resource view for images in the debugger.
Optimized how UrlDataManager is used.

Bug: Skia:9175
Change-Id: I9c5b3946d59fe2a2e900a245a3bd161fdce6d265
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242976
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-09-20 14:39:41 +00:00
Hal Canary
e5b65d212b pdf-comparison and image_diff_metric tools
Change-Id: I2ee96581d77c5ded9c9c2dc371a554ebda6b8d26
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242819
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-09-19 21:18:28 +00:00
Hal Canary
932a2c0e3b experimental/minimal_ios_mtl_skia_app
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Mac-Clang-arm64-Debug-iOS_Metal,Build-Mac-Clang-arm64-Release-iOS_Metal

Change-Id: I3cb9c7d9073fc0572f49fe1c48caf638e78e34f5
Resubmit-of: https://skia-review.googlesource.com/c/skia/+/238757
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239121
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-09-17 15:18:26 +00:00
Brian Osman
b47704b0bd Fix license comment in skottie_ios
Change-Id: I6591ca76578c5d43d43b87dde2582b19e6d1cf25
Bug: skia:9426
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241879
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2019-09-16 20:43:27 +00:00
Mike Reed
2d241f5b9a update videoencoder, add scale option, remove motion-blur hack
Change-Id: Ib80852d20384688a161b0f63593debbd7cdb3b42
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241760
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-09-16 19:38:35 +00:00
Hal Canary
4119443532 experimental/skottie_ios: Skottie iOS/Metal App
To use, see instructions in experimental/skottie_ios/README.md .

No-Try: true
Change-Id: I4fb71576c5e38c7776d14561930b8c2598cfb48f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240284
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2019-09-16 19:10:24 +00:00
Nathaniel Nifong
d3d13af110 Add a wasm debugger test that uses a WebGL surface
Change-Id: I9fef343d8ae958ca6382f6a781a31b6a583728bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241756
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-09-16 19:07:04 +00:00
Hal Canary
3388c1a15e gn: split out iOS templates to gn/ios.gni
motivation:  BUILD.gn os too big, also can be reused in modules.

Also: add a BUILD.gn for minimal_ios_mtl_skia_app that uses the
template.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Mac-Clang-arm64-Debug-iOS_Metal,Build-Mac-Clang-arm64-Release-iOS,Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Debug-All-Metal,Test-iOS-Clang-iPhone6-GPU-PowerVRGX6450-arm64-Release-All

Change-Id: I70ebb9668cce51ea9fa671a3d8c93041fbedcbfa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241761
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2019-09-16 18:49:24 +00:00
Mike Reed
4241f5e0a8 Revert "add guard to switch to SkPathTypes"
This reverts commit e1af44498b.

Reason for revert: breaking google3?

Original change's description:
> add guard to switch to SkPathTypes
> 
> Change-Id: I44d8b5ae8a5172d11a6d4cd9d994373dd3816d6f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241278
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: If1fffb6310921ee6f213af000da793afcf62ab0b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241560
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-09-14 19:13:44 +00:00
Mike Reed
e1af44498b add guard to switch to SkPathTypes
Change-Id: I44d8b5ae8a5172d11a6d4cd9d994373dd3816d6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241278
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-09-14 01:26:38 +00:00
Hal Canary
56df7910b0 experimental/minimal_ios_mtl_skia_app: clean up
Motivation: make is easier to add multiple views sharing a GrContext.

  - Split configure_mtk_view() from to_context()
  - AppViewDelegate no longer owns GrContext
  - Split out config_paint() and draw_example() fns
    to delineate example code from useful code.
  - AppViewDelegate no longer responsible for initializing
    itself.
  - AppViewController owns MTLDevice and GrContext.

No-Try: true
Change-Id: I608da76c7818b262c0bfbe52dd431f3007e86e2d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240201
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-09-11 13:00:43 +00:00
Hal Canary
262bff5650 experimental: minimal_ios_mtl_skia_app
Just check in the code for documentation purposes, do not compile.

No-Try: true
Change-Id: Ie3e6060b70b09aa8d72a38b724b6057b813ad850
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239103
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2019-09-04 19:56:02 +00:00
Hal Canary
03c68091c1 Revert "experimental/minimal_ios_mtl_skia_app"
This reverts commit c2dc9c8648.

Reason for revert: Build-Mac-Clang-arm64-Debug-iOS_Metal Build-Mac-Clang-arm64-Release-iOS_Metal broken:

    ninja: error: '../../../../../../skia/experimental/minimal_ios_mtl_skia_app/main.mm', needed by 'obj/experimental/minimal_ios_mtl_skia_app/gen/experimental/minimal_ios_mtl_skia_app/minimal_ios_mtl_skia_app.main.o', missing and no known rule to make it


Original change's description:
> experimental/minimal_ios_mtl_skia_app
> 
> Change-Id: Iec5b9d9b930cb8b2b97ce92c828ccba0a9e2a94d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238757
> Auto-Submit: Hal Canary <halcanary@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

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

Change-Id: I6a3c16131072019ba541ad573c95a8de4d2b5eef
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239120
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-09-04 15:52:08 +00:00
Hal Canary
c2dc9c8648 experimental/minimal_ios_mtl_skia_app
Change-Id: Iec5b9d9b930cb8b2b97ce92c828ccba0a9e2a94d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238757
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-09-04 14:44:02 +00:00
Hal Canary
a0b66fc79d SkPlainTextEditor: from experimental to modules
Change-Id: I8896283ee3a57af926a43f6647e27059d52dd7a8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237146
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-08-27 20:32:19 +00:00
Mike Klein
df54f37a5d remove SkPicture_none.cpp
I happened to notice that SkPicture_none.cpp no longer compiles.

    ...
    src/core/SkPicture_none.cpp:101:44: error: out-of-line definition of
    'CreateProc' does not match any declaration in 'SkPictureImageFilter'
    sk_sp<SkFlattenable> SkPictureImageFilter::CreateProc(SkReadBuffer& buffer) {
    ...

This leads me to conclude that it cannot be in active use.

Change-Id: I92a4daa3c7d5d7889c4f841b578c9c691525c1cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235216
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-16 14:52:25 +00:00
Hal Canary
e73aa75732 experimental/editor: up,down preserves x-coordinate
Bug: skia:9020
Change-Id: I009dead2e47d4d7d27ea383697a28c7569ffeaac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234318
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-08-13 17:46:08 +00:00
Hal Canary
5fd38c0959 experimental/editor/application: pre-shape text before showing window
Also, make constructor do even less work.

Change-Id: Iced41488757d6d5d01c4e1d02eee03ab2bb109a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234216
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2019-08-13 14:08:09 +00:00
Hal Canary
6e1b7bb2b5 experimental/editor: README.md multilingual example
No-Try: true
Change-Id: Idad1a4a624d3621a0a330ea4eb8361978ead9021
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233980
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-08-13 13:55:19 +00:00
Hal Canary
8d1b0bceed experimental/editor/README.md fix
No-Try: true
Change-Id: I893f110f609c30495d43ea86751839e3c2f78515
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233979
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-08-12 14:36:01 +00:00
Hal Canary
ded867f126 experimental/editor: shape.h to unify all shaping code
also simplify handling of implicit position at end of line.

also simplfy move() operation.

Change-Id: Ic242b5413c65295b1ac1bf7aa3a4948c3ed1c742
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233303
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-08-09 14:20:10 +00:00
Hal Canary
4acbab33bd experimental/editor: scroll on delete if necessary
Change-Id: Ib1c6ef3d257956c0876d5184423072226d70d973
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233257
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-08-08 16:08:15 +00:00
Hal Canary
bcfed55a8c experimental/editor: mouse drag select, modifierkeys cleanup.
Change-Id: I8c8de54ad6309424bdf18987ccf3eac6bdd41c19
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233080
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-08-08 02:33:44 +00:00
Hal Canary
e45bf6a603 experimental/editor: interface no longer uses stringslice
Editor::copy() now writes into a buffer provided by the client.

    Editor::text() now returns a series of `pair<const char*, size_t>`
    instead of `const StringSlice&`

Change-Id: Iff298dd7a80aaad19f9326d10c5b67bea5ef8e22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232579
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-08-06 16:52:08 +00:00
Hal Canary
b55b362e60 experimental/editor: margins now handled by application layer
Change-Id: If67ded4a4073617f2e17de465b7f017cd65c20aa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232580
Auto-Submit: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-08-05 21:29:57 +00:00
Hal Canary
f1138888e7 experimental/editor: StringSlice::fPtr type change
Change-Id: Ibfc06b96d04e3bf42d4df7a2eacdaf6b4043efd1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232576
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-08-05 18:13:37 +00:00
Hal Canary
71c34240f4 experimental/tools/gerrit_percent_encode
NoTry: true
Change-Id: I448b4791911dd1b87104ca809b2b41c62ce0ee3d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231480
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-08-05 16:11:45 +00:00
Hal Canary
ebfcf0c073 experimental/editor: cleanup
Remove unneeded setText().
    Change default font.
    EditorApplication constructor does no real work.

Change-Id: Ie257fbc9873d99ccb3972842493d65a12b0e7904
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231479
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2019-08-02 16:51:04 +00:00
Hal Canary
3f4a2b3499 sk_app, editor: cursor blink
Change-Id: I43044727298265ddb711456346c2b544ca8d509d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231477
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2019-08-02 15:36:40 +00:00
Hal Canary
7679b28639 editor: try to fix moltenvk bots
Change-Id: Id57103ac3bc9bad5f6e4b685e8b00fdc5e53aecd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230752
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-07-30 17:11:03 +00:00
Hal Canary
e9cb762215 experimental/editor : handle word-left and word-right
Bug: skia:9020
Change-Id: I308a0c9867777eb5c008f583d86d8d1c8ff5d8e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230745
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-07-30 15:48:29 +00:00
Hal Canary
1f94d3900b experimental/editor: clean up BUILD.gn
Place build rules in experimental/editor/BUILD.gn to keep the top-level
BUILD.gn file smaller.

Change-Id: Idf22aec6f86bc510f4528fe0296bc1bea69f3df2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230740
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-30 14:28:58 +00:00
Hal Canary
e37874e19e experimental/editor: Editor::markDirty() private helper
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Mac-Clang-arm-Release-iOS

Change-Id: Ie6a20943c51c45f2abc37f7215b1c67810ce20ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230736
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-07-30 14:21:28 +00:00
Ben Wagner aka dogben
e19a4f2614 Revert "experimental/editor: depend on ICU, handle word-left and word-right"
This reverts commit de23697549.

Reason for revert: Causing segfault on Mac builders; BUILD.gn needs to be formatted.

Original change's description:
> experimental/editor: depend on ICU, handle word-left and word-right
> 
> In App: ctrl-left-arrow and ctrl-right-arrow.
> 
> Added a TODO about using better notion of a word.
> 
> Bug: skia:9020
> Change-Id: I6f2b930928b9d38bca47291fd39dde7f93ccac03
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230417
> Commit-Queue: Hal Canary <halcanary@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

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

Change-Id: I62dc160d8ae1ce58878b8e222a4d7860cc92ddfe
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9020
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230577
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
Commit-Queue: Ben Wagner aka dogben <benjaminwagner@google.com>
2019-07-29 20:55:36 +00:00
Hal Canary
de23697549 experimental/editor: depend on ICU, handle word-left and word-right
In App: ctrl-left-arrow and ctrl-right-arrow.

Added a TODO about using better notion of a word.

Bug: skia:9020
Change-Id: I6f2b930928b9d38bca47291fd39dde7f93ccac03
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230417
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-29 20:19:31 +00:00
Hal Canary
9ef1b771af experimental/editor: scroll on cursor movement, Editor::getLocation
Bug: skia:9020
Change-Id: Iab91402790077c969af8e553b03525e63dab44ba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230496
Auto-Submit: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-29 19:43:38 +00:00
Hal Canary
ac0e466154 experimental/editor: fix Movement::kUp, Movement::kDown
Bug: skia:9020
Change-Id: I5c765f2be92971690f59d744207cf8b8f78c8c4a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230128
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-07-26 18:01:02 +00:00
Hal Canary
23b37dc9e0 experimental/editor: fix home, end
Bug: skia:9020
Change-Id: Ib7611212590d29eff9da870492e6ecc84f405786
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229836
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2019-07-26 15:54:12 +00:00
Hal Canary
8e9fc27822 experimental/editor: fix resize
Bug: skia:9020
Change-Id: I2f2ade4a5406b60e1b6c2004136fbbad36085d58
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230121
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-07-26 15:26:45 +00:00
Hal Canary
b3956dc6ba experimental/editor: Find nearest possible cursor position when click in whitespace
Bug: skia:9020
Change-Id: Ieb1f7a545ab3458db7124535b3be3c3d589bf1be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229388
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-07-24 15:05:05 +00:00
Hal Canary
ff2e8fe65f sk_app, Sample: Unify InputState enum.
replace() {
      if git grep -q "$1")";
      then sed -i -e "s#${1}#${2}#g" $(git grep -l "$1");
      fi
    }
    replace 'k\([A-Za-z]*\)_InputState' 'InputState::k\1'
    replace '\(\(sk_app::\|\)Window\|Sample\|\)::InputState' 'InputState'

Change-Id: I4cc18814fb1fbdd1f240aabba05aae79c54a4841
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227642
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-16 14:51:03 +00:00
Hal Canary
c726ca637b experimental/tools: set-change-id-hook
No-Try: true
Change-Id: I585d14f9614fc9b1ae03b04bb838e79d1efc2bb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226511
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-07-11 14:07:21 +00:00
Hal Canary
3a85ed12bf ModifierKey unifies sk_app::Window::ModifierKey & Sample::Click::ModifierKey
Change-Id: Idb5dfe57a7f6e3d6078ab1e68d542b084114cfbe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225735
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-09 16:16:41 +00:00
Hal Canary
43e97165d2 experimental/editor: app layer: setTitle
Change-Id: I8f8aec909f85e3bc99f6b0c9887ba513b17e00c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223925
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-06-26 16:58:20 +00:00
Hal Canary
66bf2cfb93 experimental/editor: progress on newlines
Editor:
  - Editor::Shape(): Place end-of-line cursor correctly.
  - Editor::insert(): Allow insertion of '\n' character.
  - Don't try to reshape empty string each time.
  - Editor::insert(), Editor::setText(): Validate utf8 input
  - Editor::remove(): Delete across newlines.
  - Editor::copy(): implement.
  - Editor::text() Iterator.

App:
  - Implement Ctrl-c, Ctrl-x, Ctr-v
  - Implement Ctrl-s
  - Handle "Enter" key as "insert '\n'"

StringSlice:
  - Cleanup, copy ctor.

Change-Id: I724edb82c93b30f4d5279f5a99036459a21ca2cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222508
Auto-Submit: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-06-24 17:24:35 +00:00
Nathaniel Nifong
0426c38daa Reland "Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger."
This is a reland of 7635013ad1

Original change's description:
> Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger.
> 
> Change-Id: I73affae3cd05a2aa6ac1c75c8e049d352bbf3a85
> Bug: 9176
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217135
> Commit-Queue: Nathaniel Nifong <nifong@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>

Bug: 9176
Change-Id: Ifef1ff45ac0013ba3015f88c7ecd75527b28b604
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222505
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2019-06-21 15:49:21 +00:00
Brian Salomon
384981be3d Revert "Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger."
This reverts commit 7635013ad1.

Reason for revert: breaking bots 

Original change's description:
> Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger.
> 
> Change-Id: I73affae3cd05a2aa6ac1c75c8e049d352bbf3a85
> Bug: 9176
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217135
> Commit-Queue: Nathaniel Nifong <nifong@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>

TBR=djsollen@google.com,mtklein@google.com,kjlubick@google.com,reed@google.com,nifong@google.com

Change-Id: Ie5e5dac46ba1beeb8de0a29c1a7be1264616fe92
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 9176
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222502
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-06-20 18:52:01 +00:00
Nathaniel Nifong
7635013ad1 Deserialize MultiPictureDocument based SKP files (with image sharing proc) in wasm debugger.
Change-Id: I73affae3cd05a2aa6ac1c75c8e049d352bbf3a85
Bug: 9176
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217135
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-06-20 17:33:04 +00:00
Eric Boren
b26747c0ec Remove experimental Go bindings
Change-Id: I56f85055ca93bd8db4adb157467d0c1987859511
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221656
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2019-06-18 17:13:05 +00:00
Greg Daniel
f91aeb259e Move a bunch of gpu files out of include/private and into src/gpu.
In GrRecordingContext I moved the auditTrail onto the heap and only there
when compiling for tests. This allowed us to move a lot of files out of
include private.

Change-Id: Ib76ac211c0c6fd10bacaccf0c5f93f21a59f35d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221344
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
2019-06-18 14:24:42 +00:00