commit | 6c14c8db4b1378dd1df66401f0a7cc9fc83fe732 | [log] [tgz] |
---|---|---|
author | Mike Reed <reed@google.com> | Thu Mar 09 16:36:26 2017 -0500 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Thu Mar 09 22:26:12 2017 +0000 |
tree | ff2af260ee5f898fb04d3c36793ae086c5ef5213 | |
parent | f1b61afbe97199896bfbcadb68758bfcf0dc803a [diff] |
take fast case in swap() if we're using malloc OR we're empty This avoids taking the (more expensive) copy case when we don't need to. The old behavior only took this fast case if we were "actively" using a dynamically allocated array. BUG=skia: Change-Id: I0f606ba83ff4aff3a8fc282db7a3ce1b0191fb1a Reviewed-on: https://skia-review.googlesource.com/9521 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Reed <reed@google.com>