Commit Graph

502 Commits

Author SHA1 Message Date
Florin Malita
e359aa35d1 [sksg] Fix mask/context overrides interaction
We're currently letting render context overrides (opacity, color
filters, blend mode, etc) spill down the descendent/mask content
tree.

This is not ideal, as mask content isolation breaks atomicity
assumptions for deferred overrides.  Case in point: motion blur uses
SkBlendMode::kPlus to accumulate content "layers" - but since mask
content gets rendered into a separate layer, it fails to produce the
expected result.

The fix is to realize all context overrides on the top-level mask layer
(we already allocate this layer, so there's no reason to defer
downstream anyway).

Change-Id: Icbb7e403f90feecfae5846697f559a03d8aa4097
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239036
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-09-04 14:09:44 +00:00
Kevin Lubick
2e5fe35044 [canvaskit] Add rrect support
Change-Id: Ic9f2c0224b95e277df93a1d46e59a1096d8005b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238896
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-09-03 18:00:16 +00:00
Florin Malita
2e4c283f78 [skottie] Clean up TextAdapter
Convert to DiscardableAdaptorBase, drop unneeded TextAnimatorList
wrapper, switch to raw pointer lambda captures.

TBR=
Change-Id: Idd43ad89a299ff344ff539b87cfb7790fef10b2f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238441
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-09-03 15:29:36 +00:00
Florin Malita
f49cd70119 [skottie] Plumb square selector "smoothness" prop
Requires https://github.com/bodymovin/bodymovin-extension/pull/22

Change-Id: I2614aeefce18f4b3e6c6373cd5503a7696253a76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238436
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-09-03 15:08:14 +00:00
Brian Osman
61e17c51ad Particles: Change effect lifetime logic to work like particles
Change-Id: I9f71bfbd506b56eae4fe6a430b70f8f9a31d7009
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238445
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-09-03 13:56:39 +00:00
Florin Malita
93edd9eb44 [skottie] Discard unneeded static text animators
Change-Id: I8751b1b1193726849e6ed3f127e32c17b8a7ed6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238443
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-08-30 21:09:08 +00:00
Brian Osman
33f9d69353 Pass SkPaint by const-ref to SkParticleDrawable
Makes it clearer that this isn't optional, for drawables that route to
similar canvas calls.

Change-Id: I12142c11676ba6baeea3e2779ec05af601d8beb3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238440
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-08-30 19:03:36 +00:00
Brian Osman
2aa85df8e7 Particle cleanup: split SkParticleBinding out of SkParticleEffect
Also simplify type registration.

Change-Id: Ia47febb2ae2cd5821476c3dd33a688b688aa6d6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238359
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-08-30 15:32:38 +00:00
Brian Osman
575699569e Update sample particle data in canvaskit demo
Change-Id: Ia55ed099c9b7d3896b29d51dafce11a518a0bdf9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238122
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-08-30 12:19:58 +00:00
Florin Malita
165ca3f85b [skottie] Text selector ease-high/ease-low support
Change-Id: Ia879868df677cabca6d5fcd09845efdb6147ee8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238177
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-08-29 21:34:10 +00:00
Florin Malita
a58bbee8f7 [skottie] Refactor/generalize text selector shape generators
The main motivation for this change is getting *all* shape generators to
run the ramp through a cubic mapper - this will allow adding
ease-in/ease-out support in a follow up CL.

As a bonus, the new implementation is more straightforward and concise
(at the expense of dropping some likely-premature optimizations).

Change-Id: Ia2bc53525ae529c35300be124220b4d61e4fc474
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238061
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-08-29 18:56:23 +00:00
Brian Osman
8a97782956 Move common particle code to an automatically-injected header
Change-Id: If99e1802c8187ebd98b67717d744c6695bb25900
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238118
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-08-29 18:49:33 +00:00
Hal Canary
b1f411ac05 tools/skui: put all enums in a common namespace
Change-Id: Icd331e8946d80652750b8b6ea0db65f5f676ac3e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238058
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-08-29 15:39:32 +00:00
Hal Canary
63b4d5880a SkPlainTextEditor/app: cycle typeface with ctrl-0
Change-Id: I0bcf38b0ec75a52df856948a85e5711a68e6585e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237430
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-08-28 15:55:36 +00:00
Kevin Lubick
556df5b860 [canvaskit] Fix duplicate gold name
Change-Id: Ic62f44d20ff7ceba111260841d64322d1b6610f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237802
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-08-28 13:56:46 +00:00
Florin Malita
511d2c281c [skottie] Disable text baseline snapping
Change-Id: I51ba09c78d200986a3116774f5dfd3a02bb597e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237523
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-08-27 21:24:21 +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
334a642b20 remove unused sk_sp comparison operators
These unused comparison operators are the only users of
<functional> in SkRefCnt.h, for std::less.  <functional>
is an expensive header to compile, and SkRefCnt.h is popular,
so it helps to cut dependencies like this.

Mostly we just need to add #include <functional> in a few
places that were picking it up via SkRefCnt.h.

In SkPixmapPriv.h, it looked simpler to template the argument,
since everything was inline anyway.

Change-Id: I7c125bb26a04199847357c729a1b178256c6ef8d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236942
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-27 14:52:01 +00:00
Shachar Langbeheim
ebe48959ee compile.sh: Use emar in order to bundle libraries.
This is necessary in order to use emscripten's new compiler, as
described here:
https://bit.ly/2ZlwQmz

Change-Id: I66e0a6e4e403b7a9ba94860ea9cc7e53027d6f46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237396
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-08-27 13:33:20 +00:00
Mike Klein
48e08aa973 <ostream> -> <iosfwd>
<ostream> is one of the more expensive headers to include
and that's amplified by SkRefCnt.h's popularity.

We've been including <ostream> for sk_sp's operator<<.  That's only
used by Chromium and while we could just sprinkle in a bunch of .get()
calls and remove operator<<, when I started going through and actually
doing that I got the feeling I was making things pointlessly harder to
read and write, and wanted to find a way to make it actually work.

My next instinct was to template it without mentioning ostreams,

    template <typename OS, typename T>
    auto operator<<(OS& os, const sk_sp<T>& sp) -> decltype(os << sp.get()) {
        return os << sp.get();
    }

but that makes this operator<< ambiguous with some other templated operator<<
in GTest.  They got in first, so they win...

So ultimately, switch <ostream> to <iosfwd>.   Anyone using our
operator<<() presumably has <ostream> included already, and the #include
cost for <iosfwd> is small enough that I don't think we'll mind keeping
this around indefinitely.

To repro, look at before/after of -ftime-trace:

    ~/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang++ -I. -Os -c src/core/SkCanvas.cpp -ftime-trace

I have tested locally that Chromium builds with this change.

Change-Id: I9decc2e65b5cc8fd07d8106a5eff81901aedd7d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237190
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-08-27 13:08:56 +00:00
Kevin Lubick
e384df4f5e [canvaskit] Add sundry APIs and tests
To the reviewer: I've tried to make it so each PS adds one new API.

Change-Id: I81fc85c7a93a19ce4fd725a125e138d35471e693
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237155
Reviewed-by: Mike Reed <reed@google.com>
2019-08-27 12:35:49 +00:00
Florin Malita
3c8f9cb45d [skottie] Harden motion blur
1) don't attempt to attach the effect when the layer is null

2) sksg::onRender can receive a null context - handle it gracefully

TBR=

Change-Id: I4fae08b15d448849c7c99b17df6811ad31f190c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237276
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-08-27 00:21:12 +00:00
Mike Reed
92b33354dd more rect api simplifications
set --> setLTRB
set(pts, count) --> setBounds

Bug: skia:9328
Change-Id: I807c0598a8b23b2f721db118ec41c1607114205a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237038
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-08-25 10:12:57 +00:00
Florin Malita
8828a731d8 Revert "[canvaskit] Optimize CK builds for size"
This reverts commit a3094a55fe.

Reason for revert: significant slowdown, perf bot timing out.

Original change's description:
> [canvaskit] Optimize CK builds for size
> 
>   canvaskit.wasm:   6855515 -> 5445330
>   canvaskit.wasm.gz 2554712 -> 2189897
> 
> Change-Id: I9749cf8dc66e08eb95c2f996d5b631d5fcdff342
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229078
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>

TBR=mtklein@google.com,kjlubick@google.com,fmalita@chromium.org

Change-Id: I34569bdc935b9e73b6e916fe029b871fb86ebb3b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236496
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-08-22 20:09:38 +00:00
Florin Malita
a3094a55fe [canvaskit] Optimize CK builds for size
canvaskit.wasm:   6855515 -> 5445330
  canvaskit.wasm.gz 2554712 -> 2189897

Change-Id: I9749cf8dc66e08eb95c2f996d5b631d5fcdff342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229078
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-08-22 17:45:09 +00:00
Brian Osman
badfe7a43e Enable SkSL interpreter in CanvasKit to get particles working again
Change-Id: I24a9aa04c423cc92204a9b2eb9dca9e61a1ee639
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236336
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-08-22 14:45:59 +00:00
Julia Lavrova
a40db4240e Bug fixes for Flutter
Change-Id: Ic71e377290acc8a1b4cf62c52b3cc760c31dbb3b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235802
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2019-08-21 19:22:10 +00:00
Ben Wagner
723a877d0c Make SkFunctionWrapper a better wrapper.
SkFunctionWrapper was made to be a simple abstraction over existing
resource release functions which generally follow a specific pattern of
returning void and taking a pointer to the underlying type. However,
this has been observed to be an unnecessary limit. This makes it more
generic while also making the call sites a little less brittle.

This change also uncovered an issue in msvc v19.20 to v19.22, see
https://developercommunity.visualstudio.com/content/problem/698192/in-templateusing-decltype-is-void.html
To work around this, several otherwise redundant '&' are used.

There was an attempt to take references to functions instead of pointers
to functions which greatly simplifies the intermediate wrappers.
However, that uncovered another issue in msvc, see
https://developercommunity.visualstudio.com/content/problem/699878/function-to-pointer.html

Change-Id: I54ab945ed9d9cfd0204d4d6650c2fde47cc9e175
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235105
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-08-20 20:31:36 +00:00
Julia Lavrova
916a904fb7 Placeholders implementation + unit tests
Change-Id: I4e87a6927cbd6ef087b72aaa4b2155c1859589b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235677
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2019-08-20 18:24:40 +00:00
Florin Malita
b9fb29f21e [skottie] Shaper downscale-to-fit vertical alignment mode
Introduce a new hybrid valign extension, kVisualDownscaleToFit (sk_vj: 4):

  - when the text shaped at the requested size fits within the box,
    center vertically (same as kVisualCenter)
  - otherwise, scale down until it fits (same as kVisualResizeToFit)

Change-Id: I8e096a49e2b87582e1bd42161657ec4ef561ebdf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235601
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-08-19 18:59:06 +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
Ethan Nicholas
0be3480546 Revert "Revert "unified Vulkan uniform buffers""
This reverts commit 19754b5470.

Bug: skia:
Change-Id: Ie531a962934ee1909fecda59a5ee48c98e66f898
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234900
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-08-15 19:14:03 +00:00
Brian Salomon
9c73e3df83 Turn off -Wreturn-std-move-in-c++11
Change-Id: I127c979670c3dc7dac2e35908a795afbdefca8f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234902
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-08-15 17:45:58 +00:00
Julia Lavrova
c2228560c1 Existing unit tests are working with some minor differences
Change-Id: I78fb28a553f3aa9f8709708470c121bbe452fb8a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233304
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2019-08-14 18:30:44 +00:00
Florin Malita
feacb0fb34 [skottie] Add support for multiple range selectors
Text animators can have more than one range selector.

(depends on https://github.com/bodymovin/bodymovin-extension/pull/21)

TBR=
Change-Id: Id7f73386853f0e0f9e3c0f15d5a87ec1653ba873
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234319
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-08-14 17:34:02 +00:00
Greg Daniel
19754b5470 Revert "unified Vulkan uniform buffers"
This reverts commit 5f5a481ae1.

Reason for revert: Breaking GMs and chrome roll. AA looks to be getting dropped. GM crbug_947055 shows the issue (and is also the image failing on chrome roll).

Original change's description:
> unified Vulkan uniform buffers
> 
> Bug: skia:
> Change-Id: I0edb278546e00bf9aa0427578d1bcf41581cd12d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234277
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

TBR=egdaniel@google.com,ethannicholas@google.com

Change-Id: I4969f474a112e53e7ceeb08554173253eb0577ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234577
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-08-14 15:13:12 +00:00
Ethan Nicholas
5f5a481ae1 unified Vulkan uniform buffers
Bug: skia:
Change-Id: I0edb278546e00bf9aa0427578d1bcf41581cd12d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234277
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-08-14 12:58:37 +00:00
Julia Lavrova
af89d3972e Build fix
Change-Id: Ifd59a3941cccf8c7b90de26f56ee0cf8b43e2346
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233564
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2019-08-09 19:49:13 +00:00
Julia Lavrova
db9f669eb1 Dealing with ghost spaces
Change-Id: I9cf133e915658f17d00f279ee1fa2662effa2021
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231646
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2019-08-09 18:56:13 +00:00
Julia Lavrova
b7b0b3ad53 Paragraph cache: caching the shaped results only.
That makes layout phase 10 times faster (since the shaping takes 90% of it).

LRU cache is attached to the FontCollection object and has the same life time.
Currently it has hardcoded limit on the entry numbers (128).
One the number reached, the least recently used element is removed from the cache
to free the space for a new one.

Change-Id: I597e334422614e33715d7a9ed13acf7b1f9cd0e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230755
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2019-08-09 16:51:41 +00:00
Shachar Langbeheim
87cef069ca Allow compilation without embedded font but with font manager
Change-Id: Ib21ec28d7d2051bc19c07294b37034f44af47004
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232856
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2019-08-06 19:53:30 +00:00
Avinash Parchuri
3a543aafd4 Reland "[skottie] Add onTextProperty support into PropertyObserver."
This is a reland of 2a558f5675

Original change's description:
> [skottie] Add onTextProperty support into PropertyObserver.
>
> This effectively allows observing/modifying properties at the text document level. By default
> Bodymovin exports even static TextDocuments as a single keyframe, so the unit-tests have been
> updated to store the property handles for verification.
>
> Change-Id: Iab8bcb29cdc5626d1abc34593ee9967b543428eb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231681
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

Change-Id: I3231607e469dcc321fa5900500a21f0f101c299c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232628
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-08-06 13:50:41 +00:00
Greg Daniel
08ada8eda6 Revert "[skottie] Add onTextProperty support into PropertyObserver."
This reverts commit 2a558f5675.

Reason for revert: breaking Test-Win7-Clang-Golo-CPU-AVX-x86_64-Debug-All-NativeFonts_GDI bot

Original change's description:
> [skottie] Add onTextProperty support into PropertyObserver.
> 
> This effectively allows observing/modifying properties at the text document level. By default
> Bodymovin exports even static TextDocuments as a single keyframe, so the unit-tests have been
> updated to store the property handles for verification.
> 
> Change-Id: Iab8bcb29cdc5626d1abc34593ee9967b543428eb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231681
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

TBR=fmalita@chromium.org,aparchur@google.com,isabelren@google.com

Change-Id: I5298bb45cd12b86fb921aaf835b2340205fed1b5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232582
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-08-05 20:00:51 +00:00
Avinash Parchuri
2a558f5675 [skottie] Add onTextProperty support into PropertyObserver.
This effectively allows observing/modifying properties at the text document level. By default
Bodymovin exports even static TextDocuments as a single keyframe, so the unit-tests have been
updated to store the property handles for verification.

Change-Id: Iab8bcb29cdc5626d1abc34593ee9967b543428eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231681
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-08-05 18:20:59 +00:00
Florin Malita
66374f69e4 [skottie] Fix Venetian Blinds typo
TBR=

Change-Id: Ia6d802202e6b3dfe069e36a6daeb92bf4c49b873
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232123
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-08-02 23:33:03 +00:00
Florin Malita
17b9d1d1de [skottie] Initial Hue/Saturate effect support
Due to limitations in BodyMovin/AE JSX, full effect data is not
available (specifically the "channel range" property).

We only support static master hue, static master saturation and
static master lightness at this point.

This CL also introduces a new animation builder pattern:
DiscardableAdapterBase and attachDiscardableAdapter().

The former is a base class for adapters with full animator ownership.
This enables a) capturing raw adapter pointers in animator lambdas and
b) syncing to SG only once, after all local animators are updated).

The latter is a helper for managing adapter creation and optional
destruction (when all adapter properties are static we can discard it).

Change-Id: Iecc4b78830e5464e7958cb12cdfd75a61010aa25
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231956
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-08-02 18:04:14 +00:00
Michael Ludwig
297587ba1a Update skottie/sksg to use new filter factories
Bug: skia:9280
Change-Id: I944c2985a6ebdd23a11729069a0ece2c49c4f4b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230887
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-08-02 14:51:42 +00:00
Florin Malita
80e7bd03d4 [skottie] Suppress placeholder range selector warnings
For text animators without associated range selectors, BodyMovin still
exports a selector entry with invalid (0) domain/shape props.

Suppress warnings for these, as they are expected with BM.

TBR=
Change-Id: I7ec3737ebc2a33f4ba6955975c50ea7bf116b003
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231481
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-08-01 17:18:31 +00:00
Ben Wagner
bedbb0780b Allow HarfBuzz to massage the character stream.
If the nominal_glyphs callback returns a value less than 'count'
HarfBuzz will process the rest of the buffer with the nominal_glyph
callback and attempt to find glyphs through NFC and space synthesis. It
may be preferable in the future to tweak this behavior, since this is
effectively modifying the font.

Change-Id: If2deeb643c5e636d18e914eb7ee32518f86077f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231110
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-07-31 19:54:36 +00:00
Avinash Parchuri
fe125a1103 [skottie] Rename TextValue to TextPropertyValue and make public.
This allows TextValues to be manipulated via the skottie::PropertyObserver API in a future change.

Change-Id: I96b22771d8ee9a90c8d41869ece814b0bfa4dc74
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230917
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-07-31 13:30:32 +00:00