Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/ContiguousContainer.h

Issue 2043633002: Remove obsolete friend declarations for MSVC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/ImageDecodingStore.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef ContiguousContainer_h 5 #ifndef ContiguousContainer_h
6 #define ContiguousContainer_h 6 #define ContiguousContainer_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "wtf/Alignment.h" 9 #include "wtf/Alignment.h"
10 #include "wtf/Allocator.h" 10 #include "wtf/Allocator.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 Vector<void*> m_elements; 63 Vector<void*> m_elements;
64 64
65 private: 65 private:
66 class Buffer; 66 class Buffer;
67 67
68 Buffer* allocateNewBufferForNextAllocation(size_t, const char* typeName); 68 Buffer* allocateNewBufferForNextAllocation(size_t, const char* typeName);
69 69
70 Vector<OwnPtr<Buffer>> m_buffers; 70 Vector<OwnPtr<Buffer>> m_buffers;
71 unsigned m_endIndex; 71 unsigned m_endIndex;
72 size_t m_maxObjectSize; 72 size_t m_maxObjectSize;
73
74 // Makes Buffer accessible when clearing m_buffers. Fixes MSVC build.
75 friend struct WTF::OwnedPtrDeleter<Buffer>;
76 }; 73 };
77 74
78 // For most cases, no alignment stricter than pointer alignment is required. If 75 // For most cases, no alignment stricter than pointer alignment is required. If
79 // one of the derived classes has stronger alignment requirements (and the 76 // one of the derived classes has stronger alignment requirements (and the
80 // static_assert fires), set alignment to the LCM of the derived class 77 // static_assert fires), set alignment to the LCM of the derived class
81 // alignments. For small structs without pointers, it may be possible to reduce 78 // alignments. For small structs without pointers, it may be possible to reduce
82 // alignment for tighter packing. 79 // alignment for tighter packing.
83 80
84 template <class BaseElementType, unsigned alignment = sizeof(void*)> 81 template <class BaseElementType, unsigned alignment = sizeof(void*)>
85 class ContiguousContainer : public ContiguousContainerBase { 82 class ContiguousContainer : public ContiguousContainerBase {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 ASSERT(alignedSize % alignment == 0); 211 ASSERT(alignedSize % alignment == 0);
215 ASSERT(alignedSize >= size); 212 ASSERT(alignedSize >= size);
216 ASSERT(alignedSize < size + alignment); 213 ASSERT(alignedSize < size + alignment);
217 return alignedSize; 214 return alignedSize;
218 } 215 }
219 }; 216 };
220 217
221 } // namespace blink 218 } // namespace blink
222 219
223 #endif // ContiguousContainer_h 220 #endif // ContiguousContainer_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/ImageDecodingStore.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698