diff options
author | Florin Malita <fmalita@chromium.org> | 2017-12-28 19:24:07 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-12-29 00:41:00 +0000 |
commit | 2a2dfcbb4267e1c7e4aac39e0d78bc41695a2259 (patch) | |
tree | decc8655a4ff7d570da3427fd1971daab2994c1d /samplecode | |
parent | 10f7090e6ecc7ca3345501d6f08fea0a01f7dd7a (diff) |
[sksg] Fix paint inval
Paint nodes contribute to invalidation. Hoist the inval logic from
geometry nodes to draw nodes.
TBR=
Change-Id: Iab33086c377ef4940a84dae3cdccb2c9bdbee99c
Reviewed-on: https://skia-review.googlesource.com/89901
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'samplecode')
-rw-r--r-- | samplecode/SampleSGInval.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/samplecode/SampleSGInval.cpp b/samplecode/SampleSGInval.cpp index 08bfd64377..44cdcb91d9 100644 --- a/samplecode/SampleSGInval.cpp +++ b/samplecode/SampleSGInval.cpp @@ -62,6 +62,10 @@ protected: } bool onAnimate(const SkAnimTimer& timer) override { + if (!fRoot) { + return true; + } + static constexpr SkScalar kSize = 50; static constexpr SkScalar kRate = 1.0f / 500; const auto t = timer.msec() * kRate; |