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>