Go to file
Florin Malita d5c42c8c03 [skottie] Refactor property animators
Currently, property animators use lambda captures (std::function<>) to push
values to adapters and then to the scene graph.  Some downsides:

  * complex lambda captures are expensive in terms of object code size
  * adapters with multiple animated properties don't synchronize/quiesce: each individual property tick triggers a SG
    synchronization, possibly with inconsistent state (as animator running
    order is unspecified)
  * there is no enforced scoping, resulting in fragile constructs when SG
    fragments are discarded

This CL introduces a simplified and more robust animator pattern:

  * property animators are scoped to explicit containers
  * instead of capturing arbitrary value functors, animators only capture
    a pointer to the target value

Some implementation details:

  * keyframe/interpolation logic is pretty much unchanged (just relocated)
  * introduced AnimatablePropertyContainer - a base class for animatable
    adapters
  * legacy binding functions are refactored based on the new mechanism
    (they now/transitionally inject adapter objects)
  * converted a handful of effects, to exercise trivial refactoring patterns
  * converted the text animator goo, to exercise non-trivial refactoring:
    - detecting value changes is now trickier (no more lambda magic)
    - value adjustments must be hoisted into adapter logic (no more lambda magic)
    - all dependent animated values (selectors, etc) must be scoped to the
      text adapter to avoid lifetime issues

TBR=
Change-Id: Ia5821982f251de0de58fd3f87812219ff7fcc726
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263938
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2020-01-16 22:43:12 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Make converting from 4x4 to 3x3 explicit 2020-01-16 22:15:30 +00:00
bin [infra] Fix bin/try 2020-01-14 12:05:56 +00:00
build/fuchsia Add logger service. 2020-01-04 02:27:14 +00:00
build_overrides Update Dawn backend to ToT. This is about 3 months of changes. 2019-10-15 22:26:38 +00:00
dm DCI-P3 -> Display P3 in Skia 2020-01-16 21:24:16 +00:00
docker Make OUTPUT_DIRECTORY in ProdDoxyfile configurable 2019-12-18 16:46:25 +00:00
docs/examples [minor] docs/examples: cleanup 2020-01-16 17:47:15 +00:00
example Revert "Revert "switch to new filltype for SkPath"" 2019-11-26 17:43:14 +00:00
experimental docs/examples: REG_FIDDLE_ANIMATED 2020-01-15 19:02:25 +00:00
fuzz Make it safe to include SkRuntimeEffect.h from client code 2019-12-30 21:06:56 +00:00
gm Make converting from 4x4 to 3x3 explicit 2020-01-16 22:15:30 +00:00
gn Rewrite tessellation wedge generation to be done in a single pass 2020-01-16 18:45:35 +00:00
include Make converting from 4x4 to 3x3 explicit 2020-01-16 22:15:30 +00:00
infra Roll recipe dependencies (trivial). 2020-01-15 20:07:15 +00:00
modules [skottie] Refactor property animators 2020-01-16 22:43:12 +00:00
platform_tools Reland "GrGLMakeNativeInterface_{iOS,mac,win}: clean up" 2020-01-08 16:55:43 +00:00
resources skip no-op masks 2020-01-08 21:59:24 +00:00
samplecode Make converting from 4x4 to 3x3 explicit 2020-01-16 22:15:30 +00:00
site Update remote access documentation for Win2019 2020-01-07 18:55:57 +00:00
specs [img-decode] Start on proposed new spec 2019-05-06 17:39:19 +00:00
src Isolate updating grTextStrike 2020-01-16 22:43:11 +00:00
tests Make converting from 4x4 to 3x3 explicit 2020-01-16 22:15:30 +00:00
third_party [canvaskit] Remove support for T1 fonts and reduce code size 2020-01-06 18:49:41 +00:00
tools Add a --scale flag to skpbench 2020-01-16 22:29:31 +00:00
.clang-format restore .clang-format 2019-03-21 15:52:32 +00:00
.clang-tidy add google-build-namespaces to clang-tidy checks 2018-12-12 16:33:59 +00:00
.gitignore clean up some .gitignores 2019-05-15 19:55:45 +00:00
.gn Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
AUTHORS Optimize SkSL xor where one argument is constant 2019-12-20 14:50:46 +00:00
BUILD.gn add more docs/examples from named fiddles. 2020-01-14 19:22:26 +00:00
codereview.settings Make uploading to Gerrit the default for Skia 2016-11-09 19:07:56 +00:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Moved committer list to chrome-infra-auth and deleted it from the repo 2015-09-02 13:37:54 -07:00
DEPS Roll third_party/externals/swiftshader 146e16f68fdc..5fc197dc7669 (10 commits) 2020-01-16 04:56:07 +00:00
go.mod Update go.skia.org/infra in go.mod/go.sum 2020-01-09 15:03:46 +00:00
go.sum Update go.skia.org/infra in go.mod/go.sum 2020-01-09 15:03:46 +00:00
LICENSE LICENSE file: clean up 2019-11-22 21:59:03 +00:00
OWNERS add OWNERS file 2017-12-01 19:50:19 +00:00
PRESUBMIT.py remove obsolete presubmit checks 2020-01-14 15:47:13 +00:00
public.bzl skottie_ios_app: Add OpenGL. 2020-01-14 16:16:32 +00:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
RELEASE_NOTES.txt Add SkImage::CompressionType::kBC1_RGBA8_UNORM support 2020-01-16 21:45:33 +00:00
whitespace.txt Whitespace test 2019-05-18 13:05:29 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.