> This is an alternative solution to the PR: > https://github.com/openjdk/jfx/pull/1310. > > This solution is based on the invariant that if a node is marked as dirty, > all ancestors must also be marked as dirty and that if an ancestor is marked > as clean, all descendants must also be marked as clean. > Therefore I removed the ``clearDirtyTree()`` method and put its content to > the ``clearDirty()`` method. > > Furthermore, since dirty flag is only used when rendering by ``ViewPainter``, > it should also be deleted by ``ViewPainter`` only. > This guarantees: > 1. that all dirty flags are removed after rendering, and > 2. that no dirty flags are removed when a node is rendered, e.g. by creating > a snapshot or printing. > Therefore I removed all calls of the methods ``clearDirty()`` and > ``clearDirtyTree()`` from all other classes except the ``ViewerPainter``. > > The new version of the ``clearDirty()`` method together with calling it from > the ``ViewerPainter`` needs to visit far fewer nodes compared to the version > prior this PR. > > The supplied test checks that the nodes are updated even if they are > partially covered, which led to the error in the version before the PR. The > test can be started with: > ``gradlew -PFULL_TEST=true -PUSE_ROBOT=true :systemTests:test --tests > NGNodeDirtyFlagTest``
eduardsdv has updated the pull request incrementally with one additional commit since the last revision: JDK-8322619: Use VisualTestBase.getColor(..) ------------- Changes: - all: https://git.openjdk.org/jfx/pull/1451/files - new: https://git.openjdk.org/jfx/pull/1451/files/ac971e14..229927cc Webrevs: - full: https://webrevs.openjdk.org/?repo=jfx&pr=1451&range=04 - incr: https://webrevs.openjdk.org/?repo=jfx&pr=1451&range=03-04 Stats: 5 lines in 1 file changed: 0 ins; 4 del; 1 mod Patch: https://git.openjdk.org/jfx/pull/1451.diff Fetch: git fetch https://git.openjdk.org/jfx.git pull/1451/head:pull/1451 PR: https://git.openjdk.org/jfx/pull/1451