Move updateCPURenderAttributes
calls to where they're actually needed
#624
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR depends on #555
Resolves
Resolves #623
Proposed Changes
This PR moves
updateCPURenderAttributes
calls from the_touchingBounds
function toisTouchingColor
andisTouchingDrawable
, and moves theupdateCPURenderAttributes
call in_getConvexHullPointsForDrawable
to after the no-points-in-hull check.Reason for Changes
_touchingBounds
doesn't actually require the passed drawable's matrix or silhouette to be up-to-date. However,isTouchingColor
andisTouchingDrawables
relied on it updating those. For clarity (and to prevent things from breaking if a future coder decided to "optimize"_touchingBounds
), these calls have been moved (in the form of calls to the newupdateCPURenderAttributes
function) to the places that actually require the drawable's matrix and silhouette to be updated._getConvexHullPointsForDrawable
doesn't do anything that requires the drawable's CPU render stuff to be up-to-date until after the no-points-in-hull check, so it's safe to not update them until after it.