History log of /external/skia/experimental/sksg/SkSGGroup.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/SkSGGroup.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/SkSGGroup.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/SkSGGroup.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/SkSGGroup.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/SkSGGroup.cpp