History log of /external/skia/experimental/sksg/SkSGNode.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3ba3fa72ae2fd4102cff22b947d124f72ce0f880 22-Jan-2018 Florin Malita <fmalita@chromium.org> [sksg] Refactor inval registration

... to avoid having too many Node friends.

TBR=
Change-Id: I8f8ff570d94ea48017935066a3d51cd8265ec120
Reviewed-on: https://skia-review.googlesource.com/97980
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
/external/skia/experimental/sksg/SkSGNode.cpp
8008df1080f5623bf1cf13c713082c2b732d4eb2 17-Jan-2018 Mike Reed <reed@google.com> handle large rects, rename helper

To fix gm/bigrect, needed to do adjust "largest" rect so it doesn't become empty when round-tripping with SkRect/SkIRect.
I renamed it after this.

Bug: skia:
Change-Id: I747782c8456da603cf298275d2300ea1996e7629
Reviewed-on: https://skia-review.googlesource.com/95563
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
/external/skia/experimental/sksg/SkSGNode.cpp
274218ef0173ff6046f2258c703c1c83ea37c02f 08-Jan-2018 Mike Reed <reed@google.com> move largest apis into private

Related to https://skia-review.googlesource.com/c/skia/+/91860

Bug: skia:
Change-Id: Ia8fd981b422bbab75541b078277d2e09e1fc9d41
Reviewed-on: https://skia-review.googlesource.com/91940
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/experimental/sksg/SkSGNode.cpp
c14f144484eff57f6861766510876d83b9046fa6 05-Jan-2018 Florin Malita <fmalita@chromium.org> [sksg] More inval fixes

Backpedal on node/reval-time-determined damage: nodes cannot control
the invalidation order, and shared descendants may be revalidated before
a particular ancestor gets to query their state - thus making any
decisions based on that invalid.

Instead, apply damage suppression at invalidation time, based on node
type/traits. Node types which don't generate direct damage are marked
as such, and the invalidation logic bubbles damage past them, until it
finds a valid damage receiver.

Nodes which currently suppress damage:

- PaintNode (and subclasses)
- GeometryNode (and subclasses)
- Matrix

TBR=
Change-Id: I843e683e64cb6253d8c26d8397c44d02a7d6026f
Reviewed-on: https://skia-review.googlesource.com/91421
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
/external/skia/experimental/sksg/SkSGNode.cpp
18eafd922d911606dfe991efad8ec5eaafbc2704 05-Jan-2018 Florin Malita <fmalita@chromium.org> [skotty, sksg] Add layer transform inheritance support

Split the matrix component of sksg::Transform into its own, free-floating,
chainable node.

Update the composite transform animator to target matrix nodes instead of
transform nodes.

Update the layer transform attachment logic to follow "parent" references,
and build matrix inheritance chains on the fly.

TBR=
Change-Id: I017e5e462274c2cc210730e057b3ea2e7de5c0cb
Reviewed-on: https://skia-review.googlesource.com/90803
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
/external/skia/experimental/sksg/SkSGNode.cpp
0ebf4192f18778df844767c31dab8d502d78684c 05-Jan-2018 Florin Malita <fmalita@chromium.org> [sksg] More inval fiddling

Node subclasses can now control whether their bounds (changes)
contribute to damage.

Tristate:

* Default: The node bounds contribute to damage if the node itself was
invalidated, observing hasSelfInval(). This is the default
behavior.

* ForceSelf: The node bounds contribute to damage, regardless of
hasSelfInval(). Used for domain-boundary nodes (e.g. Draw),
which gate blocked fragments (e.g. geometry, paint nodes).

* BlockSelf: The node bounds do not contribute to damage, regardless of
hasSelfInval(). Used for nodes which do not contribute
damage directly (e.g. paints, geometry).

TBR=
Change-Id: I7c941c7ea12e14b008d846ec13108e66e34dbc73
Reviewed-on: https://skia-review.googlesource.com/91104
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
/external/skia/experimental/sksg/SkSGNode.cpp
c75e2401a82640c35b0b5f80a5684d0892904530 03-Jan-2018 Florin Malita <fmalita@chromium.org> [sksg] Refine invalidation logic

We need to discriminate between nodes whose bounds updates contribute to the dirty
region, and nodes whose bounds changes do not.

E.g. animated shape in a group: the animated shape node bounds should yield damage,
but the ancestor group bounds should not.

To accomplish this, we refine the invalidation state:

1) self invalidation == the node itself was invalidated, and its bounds updates
yield damage.
2) descendant invalidation == the node has some (self-)invalidated descendant,
but its own bounds are not contributing damage.

Also:

* hoist the bounding box invalidation logic into the base class (Node::revalidate)
and update to respect the states described above.
* remove (now-redundant) GeometryNode bbox logic.
* update revalidation methods to return the node bbox instead of void

TBR=
Change-Id: I8023d1793fb501c945a53f2dc2d2983e5b620ade
Reviewed-on: https://skia-review.googlesource.com/90581
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
/external/skia/experimental/sksg/SkSGNode.cpp
4aa4441186b06565a597ec4a9baac5a972fddb51 19-Dec-2017 Florin Malita <fmalita@chromium.org> Initial scene graph (SkSG)

Sketching a thin (as in close-to-skia-semantics) scene graph API, focused on
external animation, inval tracking and minimal repaint.

Only a few concrete classes/features so far:

* Rect/Color/Transform/Group
* basic inval tracking
* a trivial animated sample with inval visualization

Pretty much everything (especially naming) is volatile, so treat accordingly.

The interesting bits to review are likely in Node.{h,cpp} for inval and
SampleSGInval.cpp for usage.

Initial class hierarchy:

* Node: invalidation/ancestors tracking
|
-- * RenderNode: onRender(SkCanvas)
| |
| -- * Draw (concrete): rendering a [geometry, paint] tuple
| |
| -- * Group (concrete): grouping multiple RenderNodes
| |
| -- * EffectNode: single-descendant effect wrapper
| |
| -- * Transform (concrete): transform effect
|
-- * PaintNode: onMakePaint()
| |
| -- * Color (concrete): SkColor paint wrapper
|
-- * GeometryNode: onComputeBounds(), onDraw(SkCanvas, SkPaint)
|
-- * Rect (concrete): SkRect wrapper

TBR=

Change-Id: Iacf9b773c181a7582ecd31ee968562f179d1aa1b
Reviewed-on: https://skia-review.googlesource.com/85502
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
/external/skia/experimental/sksg/SkSGNode.cpp