Use clipRect instead of saveLayer for drawing ink trail
Calling saveLayer() on the canvas before drawing the delegated ink trail is unnecessarily expensive - it allocates a temporary buffer for the path to be drawn into for resolving and layer blending that may need to occur. However, since there is only one trail, this isn't required, and we can instead just use clipRect to ensure the trail is clipped to the bounds of the presentation area. Bug: 1148533 Change-Id: Id60d1def6215616f65838aae05658317c8fcd372 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2536086Reviewed-by:Michael Ludwig <michaelludwig@google.com> Reviewed-by:
weiliangc <weiliangc@chromium.org> Commit-Queue: Mario Bianucci <mabian@microsoft.com> Cr-Commit-Position: refs/heads/master@{#827882}
Showing