DescriptionRewrite the while loop in DrawingBuffer::createOrRecycleBitmap
Right now inside while loop we call Vector::remove() and that requires
resizing and copying which is quite expensive. This CL rewrite that
for loop by creating a new local Vector, and copy into it all the elements
that are not supposed to be removed. Then we swap this local Vector
with m_recycledBitmaps.
Committed: https://crrev.com/303824133c0cfff4028742fefe453df5bd222ec5
Cr-Commit-Position: refs/heads/master@{#421884}
Patch Set 1 #Patch Set 2 : fix compile #Patch Set 3 : changed to std::move_if #Messages
Total messages: 17 (9 generated)
|