aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/viewer
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-02-11 10:18:58 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-12 18:16:45 +0000
commitb43a3e0160b3854a04305decd1d9e766a3889b3a (patch)
tree558df15837b1a127235d9613b78a737461bb3b01 /tools/viewer
parent89e62f898856654cc8523d65dc86bf0a04d1ae9e (diff)
Only use DeviceCM->fNext if the layer doesn't affect the clip
Before this, fNext always pointed at the next (prev) saveLayer in the stack. Typically each layer is isolated, as it is defined to "consume" the current clip. Android has an option to not affect/consume the clip, hence the support for looping through this link-list in updateMC(). The current code always executes this loop, subtracting the current layer's clip from the global clip, so typically the 2nd iteration will see an empty remaining clip and draw nothing ... but we still pay for the subtract and the draw-overhead. This change makes fNext point to the next layer ONLY if the current layer was marked as non-consuming. As a side-effect, this change also now detects the "last" restore by looking for fMCRec == null, rather than fNext == nullptr. fMCRec was always null on the last layer, so this change is safe, and could have landed independently. BUG=skia:6214 Change-Id: I787574fa35c4869d3b884054aece925f457ad5bd Reviewed-on: https://skia-review.googlesource.com/8348 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'tools/viewer')
0 files changed, 0 insertions, 0 deletions