Commit Graph

3 Commits

Author SHA1 Message Date
Florin Malita
1d585c219b [skottie] SkResources::loadTypeface() callback
Some clients already have SkTypeface objects, and forcing them to pass
these as SkData is awkward - especially since Skottie immediately turns
them into SkTypeface again.

Replace the existing loadFont() callback with loadTypeface().

(for compatibility, we try both for now, but the plan is to phase-out
loadFont)

Change-Id: Ib4c2446a96cb6a5f95581c405d0a1b4ecff7ddb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296718
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-06-16 18:53:04 +00:00
Brian Osman
849f4d6571 Copy SkottieUtils' classes into skresources
For now, we'll have two copies. Once clients are using the skresources
versions exclusively, we can remove the originals from skottie.

Change-Id: I3152f526b0505b8374bdd9b4513a80bddc702ccc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256416
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-11-26 14:25:44 +00:00
Brian Osman
85bf9314c0 Extracted Skottie's resource provider to a separate module
This is a first pass that should help with migrating clients.
The utility implementations of ResourceProvider are still in
skottie - those are going to be harder to move. More likely
that I'll add parallel implementations in skresources, then
we can shift clients over and delete the skottie copy.

I'm planning to use this interface/system in particles.

Bug: skia:9513
Change-Id: I004da685983c05cb1b48a75f8a23bd7d73a3f5af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256077
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-11-25 18:58:26 +00:00