This relands commit 4d6d9e3f89.
Original change's description:
> [skottie] Max lines text auto-sizing constraint
>
> Introduce a new text property ("xl"), to limit the number of lines when
> auto-sizing.
>
> This is a Skottie extension, pending UI/controls in Bodymovin.
>
> Change-Id: Id0f1e633e1b324a97b227d6b187cd540990796a7
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518498
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
> Commit-Queue: Florin Malita <fmalita@google.com>
Change-Id: Ib9d28366332866d8b787f89fa1dc13132c02b435
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518699
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Introduce a new text property ("xl"), to limit the number of lines when
auto-sizing.
This is a Skottie extension, pending UI/controls in Bodymovin.
Change-Id: Id0f1e633e1b324a97b227d6b187cd540990796a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518498
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
AfterEffects and Bodymovin support an "AllCaps" text flag which forces
text capitalization.
* add toUpper() bindings to SkUnicode/SkICU
* add capitalization options to SkottieShaper
* plumb existing Lottie 'ca' (AllCaps) prop
* also fix a couple of unrelated whoopsies
Change-Id: I8e80921b66530e9830938004946082c6e450b04b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445104
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Introduce two new text properties to control the font size range when
auto-scaling text:
- plumb new json props ('mf' -- minimum font size, 'xf' -- maximum
font size)
- update the scale-to-fit binary search to use the specified extremes
Change-Id: I9e7e4915936a0be74bea473a520cf75acc05c84b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404781
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Auto-resizing and vertical alignment require a non-empty text box. But
currently, the presence of the text box is used to discriminate between
point text [1] and paragraph text [2].
In order to support auto-scaling and v-alignment for point text, we must
decouple the text mode encoding from the text box:
* introduce and explicit LinebreakPolicy property for skottie::Shaper,
and use it to control line breaking instead of the text box presence
* by default, the line breaking policy is initialized per existing
AE/BM semantics: non-empty text box -> paragraph mode,
empty box -> point mode
* the policy can be overridden via the PropertyObserver APIs to enable
point mode auto-resizing and vertical alignment
[1] https://helpx.adobe.com/after-effects/using/creating-editing-text-layers.html#enter_point_text
[2] https://helpx.adobe.com/after-effects/using/creating-editing-text-layers.html#enter_paragraph_text
Change-Id: I007144283a31a2faa579d7eec82af72af3d540cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321788
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
AE allows selecting the paint order when both fill & stroke are present.
The CL also fixes some text stroke issues: stroke width not parsed
correctly and not actually used on the paint.
Change-Id: Iec27bb65d09f689365e43b801d3844106780572b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301857
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Replace with a stateful LazyHandle implementation.
A secondaty objective is to preserve source-level API compat for
existing clients.
TBR=
Change-Id: I8e37b1e045a94d657996b7002e89cedb5b9d128f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288816
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Also this contains a demonstration of how to implement this in CustomPropertyManager.
Change-Id: If4770e47b87ed76c98a85de3c235ab27c913dbc0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269696
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
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>
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>
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>
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>
This allows for unit-testing of implementations of the Skottie::PropertyObserver
API, which are expected to act on the PropertyHandle.
Change-Id: If7a7518db1571523de688f2ca3d40862f8a68ada
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229880
Commit-Queue: Avinash Parchuri <aparchur@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
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>
To facilitate demo code consolidation, introduce a custom property
manager which filters for node names starting with '$' and treats all
properties sharing the same name unitarily.
Update the Colorize GM to use this new helper.
Also revisit the PropertyObserver interface:
* aliases for client-facing value types
* introduce a new (decomposed) TransformPropertyValue, to replace component-wise setters
* consolidate the PropertyHandle interface to only expose get()/set()
Bug: skia:
Change-Id: I9aa9ee80c1fb57bbfbacab0fc3f017da909b24d9
Reviewed-on: https://skia-review.googlesource.com/c/173220
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Introduce a PropertyObserver to receive property notifications for layer
and shape nodes.
Properties are communicated using strongly-typed "handles", which act
as impedance adapters between the AE/BM model and the internal Skottie
model.
Reviewed-by: Mike Reed <reed@google.com>
Change-Id: Id155076faa8595f6b4d81672559f01c2e0c7455a
TBR=
Reviewed-on: https://skia-review.googlesource.com/156626
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This reverts commit 7903957247.
Reason for revert: breaking SAN bots
Original change's description:
> [skottie] Initial property setters
>
> Introduce a PropertyObserver to receive property notifications for layer
> and shape nodes.
>
> Properties are communicated using strongly-typed "handles", which act
> as impedance adapters between the AE/BM model and the internal Skottie
> model.
>
> Bug: skia:
> Change-Id: Ieb9be1ff843673f1f4fe900d3774c36956b7c941
> Reviewed-on: https://skia-review.googlesource.com/156186
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Mike Reed <reed@google.com>
TBR=fmalita@chromium.org,reed@google.com
Change-Id: Ic737766e305bb8dff10a817fa37f16fdfa051c93
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/156620
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Introduce a PropertyObserver to receive property notifications for layer
and shape nodes.
Properties are communicated using strongly-typed "handles", which act
as impedance adapters between the AE/BM model and the internal Skottie
model.
Bug: skia:
Change-Id: Ieb9be1ff843673f1f4fe900d3774c36956b7c941
Reviewed-on: https://skia-review.googlesource.com/156186
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>