Commit Graph

1357 Commits

Author SHA1 Message Date
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
Mike Reed
d62d406aa2 Revert "Revert "try resolver pattern""
This reverts commit 2bafb64ed3.

Change-Id: I46f29284546a8978fd0005a0937e28410e5ac0da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220518
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-06-12 14:46:56 +00:00
Herb Derby
2bafb64ed3 Revert "try resolver pattern"
This reverts commit a716809d5a.

Reason for revert: breaks google3

Original change's description:
> try resolver pattern
> 
> Change-Id: I32c5dbf4cacce9112df42a6f29800859625dc4a9
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/218965
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> Auto-Submit: Mike Reed <reed@google.com>

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

Change-Id: Ib6facd0fda07762ed394b7b2c84771d7a93edae0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219488
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-06-11 16:01:14 +00:00
Mike Reed
a716809d5a try resolver pattern
Change-Id: I32c5dbf4cacce9112df42a6f29800859625dc4a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/218965
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-06-11 12:35:38 +00:00
Mike Klein
4b432fa87b run rewrite_includes.py
Just your basic periodic cleanup.

Change-Id: I04d9ca5cfff05e6e2c29dd9caef3ce12cda45247
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219340
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-06-06 17:11:02 +00:00
Mike Reed
ede7e99465 add simpler addFrame api (helps with threaded producers)
Change-Id: I458dc2fb59aa32e084b0b03945afd74ff5ee42ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217861
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-06-03 15:40:35 +00:00
Mike Reed
ab399c8467 free formatctx when we're done
Change-Id: I039fad48a65048cf20c0d2d2981120466c41038b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217124
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-05-30 17:41:28 +00:00
Mike Reed
210a28a8cf rm dead code
Change-Id: I2829d94451ce0278b44b98ca0195d04124b669fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/216682
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-05-29 20:09:04 +00:00
Mike Reed
f97e8e961b simplify api to make encoder, use swscale for faster rgb->yuv
Change-Id: I19ea48667aa843e1166231fe8d2622af91cce972
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/216611
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-05-29 17:59:18 +00:00
Mike Reed
c0ee21feb8 skia helper for encoding video
Change-Id: I36aef5872fc8f5938854ab18b754f3800b9879ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215165
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-05-28 20:39:21 +00:00
Hal Canary
308adbb418 experimental/editor: minor change
Change-Id: Ifd3963e6bb337832c287f2b0553315828a5d3889
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/216350
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-05-28 16:26:19 +00:00
Mike Klein
fe0aeb3691 update SkUserConfig.h a bit
- tweak comments to be immune to tools/rewrite_headers.py
    - remove a few bonkers settings no user should change

While I'm at it, re-run tools/rewrite_headers.py.

Change-Id: Ie588d604010dd26abcdd277c586cd6c58568dcf5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214740
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-05-20 17:52:22 +00:00
Mike Reed
7bf160e6d5 Revert "Revert "Experimental SkVideoDecoder, to wrap calls to ffmpeg""
fix google3 build (don't build the new gm)

This reverts commit 9cc53fa4bd.

Change-Id: I3de8aa4959f62a380f1d4aaf2b788d250775e194
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214442
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-05-17 21:25:48 +00:00
Michael Ludwig
9cc53fa4bd Revert "Experimental SkVideoDecoder, to wrap calls to ffmpeg"
This reverts commit 69596470d1.

Reason for revert: breaks google3 roll
third_party/skia/HEAD/gm/video_decoder.cpp:8:10: fatal error: 'experimental/ffmpeg/SkVideoDecoder.h' file not found
#include "experimental/ffmpeg/SkVideoDecoder.h"

Original change's description:
> Experimental SkVideoDecoder, to wrap calls to ffmpeg
> 
> If you want to build ffmpeg locally, here is how I configured it:
> ./configure --disable-all --enable-avcodec --enable-avformat --enable-decoder=h264 --enable-parser=h264 --enable-demuxer=mov --enable-static --enable-protocol=file
> 
> Bug: skia: 9085
> Change-Id: If1892b62314af26e56ecb0293850f7554106c3d0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213664
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Nathaniel Nifong <nifong@google.com>

TBR=mtklein@google.com,bsalomon@google.com,scroggo@google.com,brianosman@google.com,fmalita@chromium.org,reed@google.com,nifong@google.com

Change-Id: I33d68e11a67ccf3616296e3377b42438c7f95edc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia: 9085
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214441
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-05-17 20:43:10 +00:00
Mike Reed
69596470d1 Experimental SkVideoDecoder, to wrap calls to ffmpeg
If you want to build ffmpeg locally, here is how I configured it:
./configure --disable-all --enable-avcodec --enable-avformat --enable-decoder=h264 --enable-parser=h264 --enable-demuxer=mov --enable-static --enable-protocol=file

Bug: skia: 9085
Change-Id: If1892b62314af26e56ecb0293850f7554106c3d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213664
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2019-05-17 19:18:28 +00:00
Brian Osman
c6568afa0b Remove Nima from DEPS, experiments, Viewer, etc.
Change-Id: Ide69d3c9f0f02e886bd0d52723d425a548edd2e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214187
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-05-16 17:02:11 +00:00
Ben Wagner
8bd6e8f198 Move SkTSearch.h into src.
No public headers are using it anymore, so move it from include/private
into src/core where SkTSearch.cpp resides.

Change-Id: I4499c629487ff1b8c391b44708616d67567a3e9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213674
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-05-15 14:15:07 +00:00
Mike Klein
ad44dd500f preserve comments past the #include ""
Tacking on parts[2] lets us keep things like IWYU comments

    #include "something.h" // IWYU pragma: keep

Rerun the script too... not much interesting.

Change-Id: I9f02c81ffece0ecf3e99730d4a12d49e01417ddc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213697
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-05-14 19:35:34 +00:00
Hal Canary
0569447470 experimental/editor: progress
- selection
  - some state moved out of editor.
  - Editor::getPosition() translates x,y mouse position into text
    position
  - General Editor::move() function for moving cursor
  - Editor::insert() (does not yet handle newlines)
  - Editor::remove() (does not yet delete across lines)
  - new StringSlice class to replace SkString.

Change-Id: I1ca03247a745bc045e41619cd5a839c495dc405b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211884
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-05-07 18:01:50 +00:00
Ben Wagner
c5eb81bf44 Fixes for experimental/go-skia
No-Try: true
Change-Id: I7799cde0a361984ed958386d2568a959a6cf12ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212024
Commit-Queue: Ben Wagner aka dogben <benjaminwagner@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
2019-05-03 19:22:51 +00:00
Ben Wagner
0b9b1f1847 IWYU for SkTLogic.h
Noticed that there was an include for <array> in there that didn't make
a lot of sense, so cleaned up the others which are hanging around from
older code which was in there.

Change-Id: I77acbb0914989e9bf67ab74dfd842a798ea592f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206172
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-05-02 21:17:37 +00:00
Hal Canary
7b300a4e47 Experimental Editor: begin text selection code
Bug: skia:9020
Change-Id: I6a67ef4a3bcf443dbe14f58e81b405588f84848e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211345
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2019-04-30 17:21:52 +00:00
Hal Canary
50d650d3ef Experimental text editor: factor out Editor class.
Change-Id: Ie3ab5566b66f8255097001d015b39ca650cc0f20
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210920
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-04-29 15:43:35 +00:00
Stan Iliev
4732dd3158 Fix C API example
Test: built and ran skia-c-example.c
Change-Id: I5691fa474f3efb6198c389180653ccded67e4f7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210633
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2019-04-28 01:09:13 +00:00
Hal Canary
b8f81af531 Experimental: text editor
Proof of principle of a text editor written with Skia & SkShaper.

(Work In Progress)

Bug: skia:9020
Change-Id: I4fb837b719bc42fab8d8bdce2ca68fb9c1829d21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210381
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-04-25 15:22:49 +00:00
Mike Klein
c0bd9f9fe5 rewrite includes to not need so much -Ifoo
Current strategy: everything from the top

Things to look at first are the manual changes:

   - added tools/rewrite_includes.py
   - removed -Idirectives from BUILD.gn
   - various compile.sh simplifications
   - tweak tools/embed_resources.py
   - update gn/find_headers.py to write paths from the top
   - update gn/gn_to_bp.py SkUserConfig.h layout
     so that #include "include/config/SkUserConfig.h" always
     gets the header we want.

No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-04-24 16:27:11 +00:00
Mike Klein
ba201aea74 make -Werror or /WX optional, off by default
Most external users complain about -Werror,
and I've heard anecdotally that devs find it annoying too.

This turns it off by default, but keeps it on the bots.

Change-Id: I6e87c92215261ebf6e961f816177386d5d58f28e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209787
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-04-23 20:39:34 +00:00
Brian Osman
c3186302bd Add skcms directory to public includes
skcms is part of Skia's public API now. This attempts to recognize that,
and pave the way for moving the header to another location more easily
in a follow up CL, or - at a minimum - for clients that redistribute
Skia as a library + includes to relocate the skcms.h header as part of
that.

Change-Id: I15da63b0d4ab8916a71fb7e6ab3656db87252707
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209640
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-04-22 20:32:23 +00:00
Nathaniel Nifong
26f410d8cf externs needed for cpu/gpu switch
Bug: skia:
Change-Id: I39de7abdc54872ae983bbb8a7e88a8b9d93a952b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206919
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2019-04-10 13:47:21 +00:00
Nathaniel Nifong
d54b1fcdd9 full collection of externs
Full list of externs that need exposing

Bug: skia:
Change-Id: I9abb3d2c595d213463f69f11b1164c965d036023
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206690
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2019-04-09 18:37:18 +00:00
Nathaniel Nifong
4c30340358 add SkpFilePlayer to externs
Bug: skia:
Change-Id: I190b6ac004f68f699cab2ec38b7af25e5113e335
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206680
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2019-04-08 17:57:04 +00:00
Nathaniel Nifong
298390e487 Add helper for loading files, use let
Bug: skia:
Change-Id: I2da7325f5cfbd451358e183e24dcf21278615eb0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206200
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-04-05 18:31:53 +00:00
Kevin Lubick
c7755d9470 [canvaskit] Bump GPU resource cache to 256MB
Wrong file was previously edited.

Change-Id: I2e78d102ca85a22268481d1958b983e41d72ee3e
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206271
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-04-05 18:06:18 +00:00
Kevin Lubick
e21616804a [canvaskit] Bump GPU resource cache to 256MB
Change-Id: I057c1af8bd7789433ac41904c45a3f8ba2fdb7e9
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206078
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-04-04 18:04:39 +00:00
Mike Reed
fae8fceb4a Use SkTileMode instead of nested enum
Add guard to transition clients

Change-Id: Ia7a3e8f95722f91e84af262168dadf89a78707da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205720
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-04-03 15:24:18 +00:00
Nathaniel Nifong
63f8e0a3a9 Include wasm debugger in continuous build
Bug: skia:
Change-Id: Ic51ef5706bff66482127e648f2cb9ca0826ef4ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205260
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-04-01 18:50:13 +00:00
Nathaniel Nifong
de5df65812 changes to wasm debugger for UI integration
Bug: skia:
Change-Id: I8f00cbb6682c1fdf6c1bb5eb118a00f38b7005f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203730
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-03-28 18:06:13 +00:00
Kevin Lubick
3902628e35 Support WebGL 1.0 with caps
There is some logic in here for 2.0 as well, just as a
"as long as I was looking at the specs", but only 1.0
is really supported.

This seems to resolve the bug where some GPUs weren't
advertising correctly that they had vertex array object
support, by checking for both extension names (with and
without "GL_" prefix)

Of note, this saves about 18 Kb (5.5 Kb gzipped) of code size
by compiling out the unneeded GLES checks/functionality.

Bug: skia:8378
Change-Id: I773bf4dbf231b991051d2a9f640b8047a9010e7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203461
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-03-28 17:21:23 +00:00
Mike Klein
e5acd7547b delete DAA
Change-Id: I1fd8cba067c0063c6621641e8196e69fd5e31cec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203080
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-03-22 15:44:03 +00:00
Mike Klein
8f4e224541 de-Sk tools/debugger
Change-Id: I489a54860139d1820471aa0330b29a8ae9eca31e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202316
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-20 18:27:01 +00:00
Nathaniel Nifong
46f5ee1561 Add selectable GPU backend to wasm debugger
Bug: skia:
Change-Id: If34e08cb320a141cb838caafeffa4f1f69c5234f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201404
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-03-15 15:34:28 +00:00
Nathaniel Nifong
cfdf87ecd2 fill out more of SkDebugCanvas interface
Added methods for toggling clip viz, overdraw viz, gpu bound viz.
methods for getting number of commands, toggling command visibility and deleting commands.
Added method for writing out json command list.

bound methods with emscrpiten and connected up to buttons in barebones interface to prove they're working.


Bug: skia:
Change-Id: I3f733b13db00ce5d14b1b5170de8fb66102c8b14
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199938
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-03-14 13:50:24 +00:00
Kevin Lubick
3f67f411d8 [canvaskit] Move from experimental to modules
Bug: skia:
Change-Id: I2ffd54cf81c974f3a80103e1726a06067cc90d82
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200044
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2019-03-11 21:09:52 +00:00
Kevin Lubick
d8c42b0491 [canvaskit] roll on npm
Bug: skia:
Change-Id: I8efc4a02ada94557c65addccca093252942ca558
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199250
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-03-11 12:43:35 +00:00
Kevin Lubick
543f352ace [canvaskit] Expose more options for working with Surfaces and Contexts
PS1 is mostly from luigi@2dimensions.com, with slight re-naming
tweaks (thanks!).

With the exposition of these extra methods, MakeWebGLCanvasSurface
is now really just a convenience function.

Bug: skia:
Change-Id: Ie61657bc580146e3e759fae8620e4df0c0212f62
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198720
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-08 18:22:43 +00:00
Florin Malita
4968ad72d6 [canvaskit] Clean up Skottie sources list
Bug: skia:
Change-Id: Ia237710d0d3a64d66750d024bd544cb39fde1e90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198662
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-03-07 17:11:39 +00:00
Kevin Lubick
f2aaa0815b [canvaskit] more testing logs
Bug: skia:
Change-Id: Iaf6210f58cad82648756b7593d09396aeaf3a7fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198660
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-03-07 16:54:13 +00:00
Kevin Lubick
ec841f71ee [canvaskit] Increase timeout and add logging to further diagnose test flakiness
Bug: skia:8810
Change-Id: Ie1ddbd70a7521aaf7bd0e9fda7ad7a53a01db4b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198600
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-03-07 15:08:16 +00:00
Nathaniel Nifong
e0aa7605f2 Interface for passing skp file from JS to WASM
Bug: skia:
Change-Id: I20d61933dd11c4cc7cc64baee8abf93372124cdd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198166
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2019-03-06 19:04:33 +00:00
Kevin Lubick
cb4eb612f0 [canvaskit] Remove additional copies of CanvasKit when testing
Speculative fix for flaky test bot. My guess is that since there were
3 .spec.js that were all trying to load CanvasKit at the same time, the
browser would fail to compile/process all that WASM and timeout.

This cleans it up so there's only one copy of CanvasKit shared by all
tests.

Bug: skia:8810
Change-Id: I60a77dae93b7c3e5d45923b4af93a223ac26220c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198161
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2019-03-06 16:03:00 +00:00
Kevin Lubick
269fe89950 [canvaskit] Add particles integration
Bug: skia:
Change-Id: I5bf08e8007b59b5e21005f5004d698e53b99ffe6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197849
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-06 14:52:56 +00:00
Nathaniel Nifong
1523963d4f Basic wasm skp debugger unit test
Bug: skia:
Change-Id: I91a3f40279724a29d759229c012be864d8a02edd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197765
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2019-03-06 14:41:17 +00:00
Kevin Lubick
b3574c904f [canvaskit] Add some APIs for speed and clients
isVolatile = false may make drawing some meshes faster.

saveLayer can be used to draw more rich effects.

Bug: skia:
Change-Id: If26f30cebba2a45f7519dd934eab02597cd6d2dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197851
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-03-06 13:54:19 +00:00
Nathaniel Nifong
ad5f6cdb7e Initial wasm debugger
Bug: skia:
Change-Id: I4d38e60f03bb315dee9c9db655ce168e9b3b475f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/195580
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-03-05 16:10:15 +00:00
Ben Wagner
a1810551f2 Add fetch-gn to canvaskit and cmake compile scripts
If fetch-gn is omitted, the scripts fail in a clean checkout.

Change-Id: Idc944f7e8c5cd2ca998ab685b942df280e17dbab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197207
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-03-05 16:03:27 +00:00
Greg Daniel
bae712104d Add flush call to take access type, flags, and semaphore.
Bug: skia:
Change-Id: I5e664939a446616ef57acc79d26a10e6908cda10
Reviewed-on: https://skia-review.googlesource.com/c/196643
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-03-02 03:45:36 +00:00
Kevin Lubick
53169df243 [canvaskit] Roll 0.4.1
Bug: skia:
Change-Id: I7d2750967ea5da83427a186b8fdd23d5d4aa69f2
Reviewed-on: https://skia-review.googlesource.com/c/196640
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-03-01 16:24:13 +00:00
Florin Malita
a8c728f080 [canvaskit] Ignore image paths in Skottie asset keys
The name should be sufficient.

Change-Id: I451ae4a0f8d0f0864f07abc0405b591a6e2ca769
Reviewed-on: https://skia-review.googlesource.com/c/196506
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-03-01 14:39:29 +00:00
Florin Malita
71a23d4195 [canvaskit] Consolidate Skottie assets
- use a single name -> SkData map for both images and fonts

 - consolidate images/fonts as a generic "assets" API

 - pass pre-constructed asset maps to the SkottieAssetManager factory
   and remove setter (immutable class at this point)

Bug: skia:
Change-Id: Ief6d3bcbba339ccd1d81fd9950871eaa691ee947
Reviewed-on: https://skia-review.googlesource.com/c/196503
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-03-01 13:14:12 +00:00
Kevin Lubick
88aff5fecd [canvaskit] Add support for external fonts
We ignore the url for web fonts, as we assume the names
will not collide.

Bug: skia:
Change-Id: Ifaaa0d27e0de2c5088bc0885c9299bb83ee78a5d
Reviewed-on: https://skia-review.googlesource.com/c/196426
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-02-28 21:24:52 +00:00
Kevin Lubick
f5ea37f981 [canvaskit] Support image assets for Skottie
There's a lot of refactoring here to fix up the
namespace of the JS (see pre/postamble js).

A reviewer can skip all the changes to interface.js,
as they are mostly whitespace changes.

Bug: skia:
Change-Id: I7cedeb98f04d4446ac4dfb555a416f30490b2b94
Reviewed-on: https://skia-review.googlesource.com/c/195885
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-02-28 15:56:09 +00:00
Kevin Lubick
dc822b1c9e update canvaskit docs to new API
Also add a dynamic text shaping demo

No-Try: true
Docs-Preview: https://skia.org/?cl=195440
Bug: skia:
Change-Id: I1e220cecae080a6a643fed8a1b9771ba8fe60915
Reviewed-on: https://skia-review.googlesource.com/c/195440
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2019-02-27 16:30:29 +00:00
Kevin Lubick
2722083cbe [pathkit][canvaskit] roll versions
This removes the buggy .then() constructor, primarily.

Docs-Preview: https://skia.org/?cl=195126
Bug: skia:
Change-Id: Ie20512267ce3f822eb0d68e71fc07f3d3245c1e9
Reviewed-on: https://skia-review.googlesource.com/c/195126
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2019-02-25 21:53:53 +00:00
Kevin Lubick
867da4b96e Allow system harfbuzz.
This should allow shaper to run on the no-deps bot.

Change-Id: I2515875d4e9b428681c20877630b904c3229ecc5
Reviewed-on: https://skia-review.googlesource.com/c/194420
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-02-23 12:14:30 +00:00
Florin Malita
a753d1a347 Reland "[skottie] Add tritone layer effect support"
This reverts commit 42ee4028a9.

Original change's description:
> Revert "[skottie] Add tritone layer effect support"
> 
> This reverts commit 71c70ea13e.
> 
> Reason for revert: broke WASM builds
> 
> Original change's description:
> > [skottie] Add tritone layer effect support
> > 
> > Generalize sksg::TintColorFilter into GradientColorfilter, to support
> > multiple color interpolation ranges.
> > 
> > Keep the two-color/single-matrix (tint) specialization, and use a table
> > color filter for the general case.
> > 
> > Change-Id: Idf42833462127c29fb69fe94337a1d1478b77dd9
> > Reviewed-on: https://skia-review.googlesource.com/c/194024
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Florin Malita <fmalita@chromium.org>
> 
> TBR=fmalita@chromium.org,reed@google.com
> 
> Change-Id: Id5bd99701f74fbd4f54d0aca74e753b7ab88bdb3
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/194429
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Florin Malita <fmalita@chromium.org>

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

Change-Id: Ie7fc28ff784b91f01108415e50677e8982ccf858
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/194430
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-02-22 23:11:02 +00:00