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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
* 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>
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>
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>
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>
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: 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
Depends on https://skia-review.googlesource.com/c/skia/+/186870
It's optional at build time, which is good given that
it adds about 2MB of uncompressed size (from 4.3 MB to 6.4 MB)
Bug: skia:
Change-Id: I5f54ad628b735c3bc880e917394fb27d16849ebe
Reviewed-on: https://skia-review.googlesource.com/c/187924
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This should have some slightly better, more minified JS and other
bugfixes
Bug: skia:
Change-Id: I7c5367b6650267ec8bafcc5de9e351bd8788392b
Reviewed-on: https://skia-review.googlesource.com/c/193582
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Removes old API and replaces with new version.
drawText now requires SkFont and other changes.
Bug: skia:
Change-Id: Ie42a5243629542934c761223ed2e8dc6685d3572
Reviewed-on: https://skia-review.googlesource.com/c/183389
Reviewed-by: Mike Reed <reed@google.com>
ToCmds/MakePathFromCmds taken from PathKit, as were the tests
for those methods.
Bug: skia:
Change-Id: I9c52c04fe61e8934543a10f84ebf8b01b449f7f4
Reviewed-on: https://skia-review.googlesource.com/c/181565
Reviewed-by: Kevin Lubick <kjlubick@google.com>
I think this would only commonly happen for cases which files aren't
being loaded (debug asmjs), but could happen if multiple ready() calls
are made (which is discouraged).
Bug: skia:
Change-Id: If848aad8603f997661502563136ac590cc9a6d5a
Reviewed-on: https://skia-review.googlesource.com/c/181409
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Prior to this, CanvasKit was unintentionally a thenable, which means if
it was used to resolve a Promise, certain logic would be called which
would put it into an infinite loop. By adding a .ready() which returns
a proper Promise and removes the .then(), this should make the CanvasKit
libary safer.
For now, the .then() still exists unless .ready() is called. .then will
be removed unconditionally in 0.4.0 which will be out after all known
clients (e.g. jsfiddle.skia.org) are changed.
See: https://github.com/kripken/emscripten/issues/5820
Bug: skia:
Change-Id: Ie4093f6b0ce03070ef737941693b06dfff93f61c
Reviewed-on: https://skia-review.googlesource.com/c/181177
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Maybe one day we'll want to expose makeWebGLContext too, thus
it takes in the attrs as a configurable parameter.
Bug: skia:
Change-Id: Idb38f932b5ea6b364d823283b262e8508bff07c4
Reviewed-on: https://skia-review.googlesource.com/c/180776
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Just to clean things up a bit.
Bug: skia:
Change-Id: I0e34c148a92817084348fcf62d9f513887933cb3
Reviewed-on: https://skia-review.googlesource.com/c/180768
Reviewed-by: Florin Malita <fmalita@chromium.org>
This moves the shared logic into path2d.js from
canvas2dcontext.js.
Bug: skia:
Change-Id: Id63bc52a190109f7cbc4e17ddb5603e6e87d5dc0
Reviewed-on: https://skia-review.googlesource.com/c/178268
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
There's the barest hint of a "font manager" here.
Basically, nothing smart to deal with bold or fallbacks.
Maybe one day, we'll expose
SkTypeface* matchStyleCSS3(const SkFontStyle& pattern);
and do smart things for fallbacks, but for now that's not
in the immediate future.
Docs-Preview: https://skia.org/?cl=177067
Bug: skia:
Change-Id: Iaeabcbf5ff4511a01b37c16c983e447c25b0e3e7
Reviewed-on: https://skia-review.googlesource.com/c/177067
Reviewed-by: Ben Wagner <bungeman@google.com>
Instead of using the test font(s), now ship with a small
(100k) Monospace font. This can be disabled by:
compile.sh no_font ...
This saves about 350k (164k gzipped) in binary size.
Bug: skia:
Change-Id: I195e3b35bea86d0f096066c1c6a44a4b602571f3
Reviewed-on: https://skia-review.googlesource.com/c/176580
Reviewed-by: Ben Wagner <bungeman@google.com>
Rather than one monolithic file, we now have one monolithic
file (canvascontext2d) and several smaller files (one per class,
and some helpers).
This should make the code navigation a little easier.
Bug: skia:
Change-Id: Ia191c2db778591af21d2a6126f053c17c4f677f1
Reviewed-on: https://skia-review.googlesource.com/c/175996
Reviewed-by: Florin Malita <fmalita@chromium.org>
While working on this, I realized some things I did
caused winding to be inconsistent with what the Canvas
spec said (and with what Chrome did).
This CL includes 2 changes to remedy that:
- removal of the subpath (which added needless complication).
- re-write of ellipse() (to mirror Chrome's implementation).
Bug: skia:
Change-Id: Idd6c8a40b3c46598892e50a1e586f2ff66b801e3
Reviewed-on: https://skia-review.googlesource.com/c/175425
Reviewed-by: Florin Malita <fmalita@chromium.org>
Add Changelog to start tracking API changes (in preparation
for NPM)
Simplify globalAlpha passing.
API change:
- Make ImageShader take an SkImage instead of encoded bytes.
Bug: skia:
Change-Id: I716f001b54ed58da3f40ae4e060b7098b550af9f
Reviewed-on: https://skia-review.googlesource.com/c/175260
Reviewed-by: Florin Malita <fmalita@chromium.org>
This is similar to how Chrome does it - more or less unapplying
the matrix as it changes to keep everything in the same
coordinate space.
We still need to keep the matrix around for things and do the math
ourselves for things like gradients.
This simplifies a bunch of logic, which makes me happy.
Bug: skia:
Change-Id: I66ee379a501cc6701f51c0f0b51d4e0634a4a692
Reviewed-on: https://skia-review.googlesource.com/c/174843
Reviewed-by: Florin Malita <fmalita@chromium.org>
setMatrix -> _setMatrix with the hope of removing it
from the API (it breaks the save()/restore() model) and
replacing it with concat (which I'll try in a follow on CL).
Adds MakeImage for those times when a client has pixels
and needs to clip them (e.g. putImageData with 7 args).
This removes SkSurface._readPixels, which I might have
been holding wrong. It might get re-surfaced eventually.
Bug: skia:
Change-Id: Iee9a494db720b22e23f9e674b20ba678fad91d25
Reviewed-on: https://skia-review.googlesource.com/c/174300
Reviewed-by: Mike Klein <mtklein@google.com>
- Replace sk_memory_order with std::memory_order.
- Remove SkAtomic<T>.
SkPath was the only user of SkAtomic<T>, for its fConvexity and
fFirstDirection fields. I've replaced them with std::atomic types, and
funneled access to them through methods that enforce the relaxed memory
order like SkAtomic<T> did.
For fConvexity, we can use the exisiting setConvexity() and
getConvexityOrUnknown() methods, adding a private const setConvexity()
to mutate convexity from const methods. For fFirstDirection I've added
private setFirstDirection() and getFirstDirection() methods.
Removing SkAtomic<T> means SkAtomics.h no longer needs SkNoncopyable.h.
I've had to update a bunch of other headers that were depending on
transitive inclusion.
Change-Id: Ib238be71a121519db6e970a9a8955834e1298c87
Reviewed-on: https://skia-review.googlesource.com/c/174220
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Firefox is the only browser that supports WASM+Source maps
so it's only really useful there.
It allows for profiling to see where time is speant, even
down in the C++ calls. (see the below comment for a screenshot)
Bug: skia:
Change-Id: Ie0380bae9fdea45e1652dd7d2d8036f242087d33
Reviewed-on: https://skia-review.googlesource.com/c/174101
Reviewed-by: Mike Reed <reed@google.com>
Add a MarkerObserver interface (to replace the current
AnnotationObserver), and update CustomPropertyManager to intercept both
properties and markers.
TBR=
Change-Id: If79de419066916bc596316f0a551c75564069239
Reviewed-on: https://skia-review.googlesource.com/c/173766
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Draw directly into an unpremul buffer (which is what Canvas's
get/putImageData is) and it speeds up Skottie animation by
about 3x.
Bug: skia:
Change-Id: Ie131276e3a675e0e5a35190da93f34d7469624e4
Reviewed-on: https://skia-review.googlesource.com/c/173644
Reviewed-by: Mike Klein <mtklein@google.com>
Refactors things inside to support both color
and gradient as _fillStyle/_strokeStyle.
Bug: skia:
Change-Id: I364ceb7d55c41e11161d5577dcd1611a592bbc29
Reviewed-on: https://skia-review.googlesource.com/c/173421
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Add a new (optionally-built) ManagedAnimation CK helper, and provide
accessors for color and opacity properties.
The new wrapper class can be used as a drop-in replacement for the existing
Animation.
Change-Id: Iab6b6be9c736697b4731722806b145cbd130ce73
Reviewed-on: https://skia-review.googlesource.com/c/173322
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This involves a refactor of how we deal with paint.
Now, we have a source-of-truth paint that is copied
and modified for each of fill/stroke/shadow.
Adds preliminary support for blend modes.
Most of what remains is text, images, and gradients.
Bug: skia:
Change-Id: I41806adeb7de4faa6c98a580c4f1de4e4a34a37d
Reviewed-on: https://skia-review.googlesource.com/c/173223
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This also exposes the ShadowUtils::drawShadow on Canvas,
even though it wasn't what was needed to duplicate
the Canvas effect.
Bug: skia:
Change-Id: I12276ef106244218e4827b7fcd7949c83cf13e5f
Reviewed-on: https://skia-review.googlesource.com/c/172967
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This re-works the subpath model and does transforming
of ports in JS rather than in C++; the latter was not easy
to conform to the Canvas Spec, especially for changing
transforms in the middle of a path.
Additionally adds jpeg to the available images it can produce.
Bug: skia:
Change-Id: I5a52ec341d4060198c8680aa4d3b85a26f77b6b9
Reviewed-on: https://skia-review.googlesource.com/c/172500
Reviewed-by: Kevin Lubick <kjlubick@google.com>