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

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

Issue 2686503003: Add support for shaping a substring to HarfBuzzShaper (Closed)
Patch Set: Fix windows compiler error Created 3 years, 10 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 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 RunSegmenter_h 5 #ifndef RunSegmenter_h
6 #define RunSegmenter_h 6 #define RunSegmenter_h
7 7
8 #include "platform/fonts/FontOrientation.h" 8 #include "platform/fonts/FontOrientation.h"
9 #include "platform/fonts/FontTraits.h" 9 #include "platform/fonts/FontTraits.h"
10 #include "platform/fonts/OrientationIterator.h" 10 #include "platform/fonts/OrientationIterator.h"
(...skipping 23 matching lines...) Expand all
34 unsigned end; 34 unsigned end;
35 UScriptCode script; 35 UScriptCode script;
36 OrientationIterator::RenderOrientation renderOrientation; 36 OrientationIterator::RenderOrientation renderOrientation;
37 FontFallbackPriority fontFallbackPriority; 37 FontFallbackPriority fontFallbackPriority;
38 }; 38 };
39 39
40 RunSegmenter(const UChar* buffer, unsigned bufferSize, FontOrientation); 40 RunSegmenter(const UChar* buffer, unsigned bufferSize, FontOrientation);
41 41
42 bool consume(RunSegmenterRange*); 42 bool consume(RunSegmenterRange*);
43 43
44 static RunSegmenterRange nullRange() {
45 return {0, 0, USCRIPT_INVALID_CODE, OrientationIterator::OrientationInvalid,
46 FontFallbackPriority::Invalid};
47 }
48
44 private: 49 private:
45 void consumeOrientationIteratorPastLastSplit(); 50 void consumeOrientationIteratorPastLastSplit();
46 void consumeScriptIteratorPastLastSplit(); 51 void consumeScriptIteratorPastLastSplit();
47 void consumeSymbolsIteratorPastLastSplit(); 52 void consumeSymbolsIteratorPastLastSplit();
48 53
49 unsigned m_bufferSize; 54 unsigned m_bufferSize;
50 RunSegmenterRange m_candidateRange; 55 RunSegmenterRange m_candidateRange;
51 std::unique_ptr<ScriptRunIterator> m_scriptRunIterator; 56 std::unique_ptr<ScriptRunIterator> m_scriptRunIterator;
52 std::unique_ptr<OrientationIterator> m_orientationIterator; 57 std::unique_ptr<OrientationIterator> m_orientationIterator;
53 std::unique_ptr<SymbolsIterator> m_symbolsIterator; 58 std::unique_ptr<SymbolsIterator> m_symbolsIterator;
54 unsigned m_lastSplit; 59 unsigned m_lastSplit;
55 unsigned m_scriptRunIteratorPosition; 60 unsigned m_scriptRunIteratorPosition;
56 unsigned m_orientationIteratorPosition; 61 unsigned m_orientationIteratorPosition;
57 unsigned m_symbolsIteratorPosition; 62 unsigned m_symbolsIteratorPosition;
58 bool m_atEnd; 63 bool m_atEnd;
59 }; 64 };
60 65
61 } // namespace blink 66 } // namespace blink
62 67
63 #endif 68 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698