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

Unified Diff: third_party/WebKit/Source/platform/fonts/SymbolsIterator.h

Issue 1613153002: Add a SymbolsIterator to aid with Symbols Segmentation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Magic constants moved, EmojiEmoji enum value explained, formatting Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/fonts/SymbolsIterator.h
diff --git a/third_party/WebKit/Source/platform/fonts/SymbolsIterator.h b/third_party/WebKit/Source/platform/fonts/SymbolsIterator.h
new file mode 100644
index 0000000000000000000000000000000000000000..db5ccc0960953215040f3412c0d5ba35e278f759
--- /dev/null
+++ b/third_party/WebKit/Source/platform/fonts/SymbolsIterator.h
@@ -0,0 +1,39 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SymbolsIterator_h
+#define SymbolsIterator_h
+
+#include "platform/fonts/FontFallbackPriority.h"
+#include "platform/fonts/FontOrientation.h"
+#include "platform/fonts/ScriptRunIterator.h"
+#include "platform/fonts/UTF16TextIterator.h"
+#include "wtf/Allocator.h"
+#include "wtf/Noncopyable.h"
+
+namespace blink {
+
+class PLATFORM_EXPORT SymbolsIterator {
+ USING_FAST_MALLOC(SymbolsIterator);
+ WTF_MAKE_NONCOPYABLE(SymbolsIterator);
+public:
+ SymbolsIterator(const UChar* buffer, unsigned bufferSize);
+
+ bool consume(unsigned* symbolsLimit, FontFallbackPriority*);
+
+private:
+ FontFallbackPriority fontFallbackPriorityForCharacter(UChar32);
+
+ OwnPtr<UTF16TextIterator> m_utf16Iterator;
+ unsigned m_bufferSize;
+ UChar32 m_nextChar;
+ bool m_atEnd;
+
+ FontFallbackPriority m_currentFontFallbackPriority;
+ FontFallbackPriority m_previousFontFallbackPriority;
+};
+
+} // namespace blink
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698