| 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 6cec28724a00253d939b1fa47e0521e410991c77..ba3d5d39ef5637fc9f39bb119c5d02bb85800051 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/ContiguousContainer.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/ContiguousContainer.cpp
|
| @@ -21,7 +21,7 @@ class ContiguousContainerBase::Buffer {
|
| WTF_MAKE_NONCOPYABLE(Buffer);
|
| USING_FAST_MALLOC(Buffer);
|
| public:
|
| - explicit Buffer(size_t bufferSize, const char* typeName)
|
| + Buffer(size_t bufferSize, const char* typeName)
|
| {
|
| m_capacity = WTF::Partitions::bufferActualSize(bufferSize);
|
| m_begin = m_end = static_cast<char*>(
|
| @@ -65,19 +65,12 @@ private:
|
| size_t m_capacity;
|
| };
|
|
|
| -ContiguousContainerBase::ContiguousContainerBase(size_t maxObjectSize, const char* typeName)
|
| +ContiguousContainerBase::ContiguousContainerBase(size_t maxObjectSize)
|
| : m_endIndex(0)
|
| , m_maxObjectSize(maxObjectSize)
|
| {
|
| }
|
|
|
| -ContiguousContainerBase::ContiguousContainerBase(
|
| - size_t maxObjectSize, size_t initialSizeBytes, const char* typeName)
|
| - : ContiguousContainerBase(maxObjectSize, typeName)
|
| -{
|
| - allocateNewBufferForNextAllocation(std::max(maxObjectSize, initialSizeBytes), typeName);
|
| -}
|
| -
|
| ContiguousContainerBase::~ContiguousContainerBase()
|
| {
|
| }
|
| @@ -104,6 +97,11 @@ size_t ContiguousContainerBase::memoryUsageInBytes() const
|
| + m_elements.capacity() * sizeof(m_elements[0]);
|
| }
|
|
|
| +void ContiguousContainerBase::reserveInitialCapacity(size_t bufferSize, const char* typeName)
|
| +{
|
| + allocateNewBufferForNextAllocation(bufferSize, typeName);
|
| +}
|
| +
|
| void* ContiguousContainerBase::allocate(size_t objectSize, const char* typeName)
|
| {
|
| ASSERT(objectSize <= m_maxObjectSize);
|
|
|