DescriptionCanvas2d: Make the intersection computation O(1) instead of O(n) in ClipList.
Inefficient current implementation has to intersect all of elements in ClipList
to get current clip path. This CL makes intersection computation O(1) by
caching the cumulative clip path in ClipList when clip() is called.
This CL comes from https://codereview.chromium.org/1630683002/#msg11.
BUG=387057
TEST=existing tests
Committed: https://crrev.com/83a374a0cac4710c5af1b5dafc28ae9876d5c721
Cr-Commit-Position: refs/heads/master@{#375293}
Patch Set 1 #
Messages
Total messages: 15 (7 generated)
|