| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/graphics/ContiguousContainer.h" | 5 #include "platform/graphics/ContiguousContainer.h" |
| 6 | 6 |
| 7 #include "wtf/Allocator.h" | 7 #include "wtf/Allocator.h" |
| 8 #include "wtf/ContainerAnnotations.h" | 8 #include "wtf/ContainerAnnotations.h" |
| 9 #include "wtf/PtrUtil.h" | 9 #include "wtf/PtrUtil.h" |
| 10 #include "wtf/allocator/PartitionAlloc.h" | 10 #include "wtf/allocator/PartitionAlloc.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 DCHECK(m_buffers.back()->isEmpty()); | 163 DCHECK(m_buffers.back()->isEmpty()); |
| 164 m_buffers.pop_back(); | 164 m_buffers.pop_back(); |
| 165 } | 165 } |
| 166 } | 166 } |
| 167 | 167 |
| 168 ContiguousContainerBase::Buffer* | 168 ContiguousContainerBase::Buffer* |
| 169 ContiguousContainerBase::allocateNewBufferForNextAllocation( | 169 ContiguousContainerBase::allocateNewBufferForNextAllocation( |
| 170 size_t bufferSize, | 170 size_t bufferSize, |
| 171 const char* typeName) { | 171 const char* typeName) { |
| 172 ASSERT(m_buffers.isEmpty() || m_endIndex == m_buffers.size() - 1); | 172 ASSERT(m_buffers.isEmpty() || m_endIndex == m_buffers.size() - 1); |
| 173 std::unique_ptr<Buffer> newBuffer = makeUnique<Buffer>(bufferSize, typeName); | 173 std::unique_ptr<Buffer> newBuffer = |
| 174 WTF::makeUnique<Buffer>(bufferSize, typeName); |
| 174 Buffer* bufferToReturn = newBuffer.get(); | 175 Buffer* bufferToReturn = newBuffer.get(); |
| 175 m_buffers.append(std::move(newBuffer)); | 176 m_buffers.append(std::move(newBuffer)); |
| 176 m_endIndex = m_buffers.size() - 1; | 177 m_endIndex = m_buffers.size() - 1; |
| 177 return bufferToReturn; | 178 return bufferToReturn; |
| 178 } | 179 } |
| 179 | 180 |
| 180 } // namespace blink | 181 } // namespace blink |
| OLD | NEW |