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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.h

Issue 2615813003: Migrate WTF::Vector::append() to ::push_back() [part 14 of N] (Closed)
Patch Set: rebase, small fix in FontSettings.h Created 3 years, 11 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 ShapeResultBuffer_h 5 #ifndef ShapeResultBuffer_h
6 #define ShapeResultBuffer_h 6 #define ShapeResultBuffer_h
7 7
8 #include "platform/fonts/shaping/ShapeResult.h" 8 #include "platform/fonts/shaping/ShapeResult.h"
9 #include "wtf/Allocator.h" 9 #include "wtf/Allocator.h"
10 #include "wtf/RefPtr.h" 10 #include "wtf/RefPtr.h"
11 #include "wtf/Vector.h" 11 #include "wtf/Vector.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 struct CharacterRange; 15 struct CharacterRange;
16 class GlyphBuffer; 16 class GlyphBuffer;
17 struct GlyphData; 17 struct GlyphData;
18 class TextRun; 18 class TextRun;
19 19
20 class ShapeResultBuffer { 20 class ShapeResultBuffer {
21 WTF_MAKE_NONCOPYABLE(ShapeResultBuffer); 21 WTF_MAKE_NONCOPYABLE(ShapeResultBuffer);
22 STACK_ALLOCATED(); 22 STACK_ALLOCATED();
23 23
24 public: 24 public:
25 ShapeResultBuffer() : m_hasVerticalOffsets(false) {} 25 ShapeResultBuffer() : m_hasVerticalOffsets(false) {}
26 26
27 void appendResult(PassRefPtr<const ShapeResult> result) { 27 void appendResult(PassRefPtr<const ShapeResult> result) {
28 m_hasVerticalOffsets |= result->hasVerticalOffsets(); 28 m_hasVerticalOffsets |= result->hasVerticalOffsets();
29 m_results.append(result); 29 m_results.push_back(result);
30 } 30 }
31 31
32 bool hasVerticalOffsets() const { return m_hasVerticalOffsets; } 32 bool hasVerticalOffsets() const { return m_hasVerticalOffsets; }
33 33
34 float fillGlyphBuffer(GlyphBuffer*, 34 float fillGlyphBuffer(GlyphBuffer*,
35 const TextRun&, 35 const TextRun&,
36 unsigned from, 36 unsigned from,
37 unsigned to) const; 37 unsigned to) const;
38 float fillGlyphBufferForTextEmphasis(GlyphBuffer*, 38 float fillGlyphBufferForTextEmphasis(GlyphBuffer*,
39 const TextRun&, 39 const TextRun&,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 // Empirically, cases where we get more than 50 ShapeResults are extremely 77 // Empirically, cases where we get more than 50 ShapeResults are extremely
78 // rare. 78 // rare.
79 Vector<RefPtr<const ShapeResult>, 64> m_results; 79 Vector<RefPtr<const ShapeResult>, 64> m_results;
80 bool m_hasVerticalOffsets; 80 bool m_hasVerticalOffsets;
81 }; 81 };
82 82
83 } // namespace blink 83 } // namespace blink
84 84
85 #endif // ShapeResultBuffer_h 85 #endif // ShapeResultBuffer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698