Commit Graph

14 Commits

Author SHA1 Message Date
Mike Klein
a01c6b0b59 reformat GN files
Change-Id: I2d19c4f0ff1439dcd923a3064eb3ba78432a5113
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281043
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-04-01 23:23:03 +00:00
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
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
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
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
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
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
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