aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-08-15 16:08:48 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-15 20:29:07 +0000
commit03776fc0d7eaf3f05886d7eaf6c2563c8fc2dfb1 (patch)
tree29c3037bdb4908dcb0cc4ec77e3b99bde34109be /src/core
parent15bb26ec70c9df6dbfc259918d9d9b0d8b2fcccc (diff)
Speed up convexpaths GM in debug builds
That GM has a path with 16k points, arranged in a rectangle. When we try to draw it in Ganesh, we first check to see if it's a (closed) rectangle. We eventually decide that it is a rectangle, but not closed, so it gets passed along. Then we construct a GrShape, which tries to simplify the shape, again asking if it's a rectangle... Each isRect query was iterating over the 16k verbs, and for each one, calling atVerb(i). That, internally, calls verbs(), which calls validate() in debug builds. So we were walking all 16k points 16k times (to ensure the bounds were correct). The end result is that the GM took over 11 seconds to draw, and now takes 3 ms. Bug: skia: Change-Id: If5f7a067b8c25f049dc64275d94a42ae4a50f6a9 Reviewed-on: https://skia-review.googlesource.com/34723 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/core')
0 files changed, 0 insertions, 0 deletions