Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/ContiguousContainer.cpp |
| diff --git a/third_party/WebKit/Source/platform/graphics/ContiguousContainer.cpp b/third_party/WebKit/Source/platform/graphics/ContiguousContainer.cpp |
| index cb42fefa480b0aa32f03d22131e9d8205945ed00..9da33c4b0d70b3130e0ebd3dba3bbe82d14a616b 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/ContiguousContainer.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/ContiguousContainer.cpp |
| @@ -171,6 +171,12 @@ void ContiguousContainerBase::swap(ContiguousContainerBase& other) |
| std::swap(m_maxObjectSize, other.m_maxObjectSize); |
| } |
| +void ContiguousContainerBase::removeEmptyBuffers() |
| +{ |
| + while (m_endIndex < m_buffers.size() - 1) |
|
jbroman
2016/07/06 17:34:03
How are we getting into a state where this is need
Xianzhu
2016/07/06 18:05:27
The method is to remove the last empty buffer. For
jbroman
2016/07/06 19:09:37
Ah, okay, it's a "shrink to fit"-ish thing. Makes
|
| + m_buffers.removeLast(); |
| +} |
| + |
| ContiguousContainerBase::Buffer* |
| ContiguousContainerBase::allocateNewBufferForNextAllocation(size_t bufferSize, const char* typeName) |
| { |