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

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

Issue 2598393002: Do not skip ink for ideographic scripts (Closed)
Patch Set: drott nits 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/fonts/GlyphBuffer.h
diff --git a/third_party/WebKit/Source/platform/fonts/GlyphBuffer.h b/third_party/WebKit/Source/platform/fonts/GlyphBuffer.h
index f05a0d5ad37ac87f4aa576a7161b1a416c8aaee5..8a521344eb6bc4ebd05bf9aef4cfc0e4acf8883d 100644
--- a/third_party/WebKit/Source/platform/fonts/GlyphBuffer.h
+++ b/third_party/WebKit/Source/platform/fonts/GlyphBuffer.h
@@ -141,6 +141,25 @@ class GlyphBuffer {
m_offsets.reverse();
}
+ void saveSkipInkExceptions() {
+ m_skipInkExceptions = WTF::makeUnique<Vector<bool, 2048>>();
+ }
+
+ bool hasSkipInkExceptions() const { return !!m_skipInkExceptions; }
+
+ bool isSkipInkException(unsigned index) const {
+ if (!m_skipInkExceptions)
+ return false;
+ DCHECK_EQ(m_skipInkExceptions->size(), m_offsets.size());
+ return (*m_skipInkExceptions)[index];
+ }
+
+ void addIsSkipInkException(bool value) {
+ DCHECK(hasSkipInkExceptions());
+ DCHECK_EQ(m_skipInkExceptions->size(), m_offsets.size() - 1);
+ m_skipInkExceptions->append(value);
+ }
+
protected:
Vector<const SimpleFontData*, 2048> m_fontData;
Vector<Glyph, 2048> m_glyphs;
@@ -149,6 +168,10 @@ class GlyphBuffer {
// (depending on the buffer-wide positioning mode). This matches the
// glyph positioning format used by Skia.
Vector<float, 2048> m_offsets;
+
+ // Flag vector of identical size to m_offset, true when glyph is to be
+ // exempted from ink skipping, false otherwise.
+ std::unique_ptr<Vector<bool, 2048>> m_skipInkExceptions;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698