aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SGTest.cpp
Commit message (Collapse)AuthorAge
* handle large rects, rename helperGravatar Mike Reed2018-01-17
| | | | | | | | | | | 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>
* move largest apis into privateGravatar Mike Reed2018-01-08
| | | | | | | | | 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>
* [sksg] More inval fixesGravatar Florin Malita2018-01-05
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* [skotty, sksg] Add layer transform inheritance supportGravatar Florin Malita2018-01-05
| | | | | | | | | | | | | | | | | 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>
* [sksg] More inval fiddlingGravatar Florin Malita2018-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Disable SkSG unit test for G3Gravatar Florin Malita2018-01-04
| | | | | | | | | | 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>
* Build fix post c75e2401a82640c35b0b5f80a5684d0892904530Gravatar Florin Malita2018-01-04
| | | | | | | | 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>
* [sksg] Refine invalidation logicGravatar Florin Malita2018-01-04
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>