Commit Graph

8 Commits

Author SHA1 Message Date
Mike Reed
8008df1080 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>
2018-01-17 17:38:57 +00:00
Mike Reed
274218ef01 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>
2018-01-08 20:42:27 +00:00
Florin Malita
c14f144484 [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>
2018-01-05 18:08:31 +00:00
Florin Malita
18eafd922d [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>
2018-01-05 03:29:04 +00:00
Florin Malita
0ebf4192f1 [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>
2018-01-05 00:42:14 +00:00
Florin Malita
f4f3f0fb29 Disable SkSG unit test for G3
Speculative fix for G3 rolls.

TBR=
Change-Id: I937d3b432cdf0c0d654f0976fd683acba39470ef
Reviewed-on: https://skia-review.googlesource.com/90405
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-04 05:17:30 +00:00
Florin Malita
67cd9b273f Build fix post c75e2401a8
TBR=
Change-Id: I3a13fe015bc88029471930d51c741f99f38f0daa
Reviewed-on: https://skia-review.googlesource.com/90404
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-04 01:37:30 +00:00
Florin Malita
c75e2401a8 [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>
2018-01-04 00:59:20 +00:00