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

Unified Diff: src/core/SkTextBlobPriv.h

Issue 1411723005: Make SkTextBlob::RunIterator public. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-10-27 (Tuesday) 15:53:46 EDT Created 5 years, 2 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: src/core/SkTextBlobPriv.h
diff --git a/src/core/SkTextBlobPriv.h b/src/core/SkTextBlobPriv.h
new file mode 100644
index 0000000000000000000000000000000000000000..2c6892b5d2088b33c407de181b0fdc0ae42c1508
--- /dev/null
+++ b/src/core/SkTextBlobPriv.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+#ifndef SkTextBlobPriv_DEFINED
+#define SkTextBlobPriv_DEFINED
+
+#include "SkTextBlob.h"
+
+/**
+ * Iterate through all of the text runs of the text blob. For example:
+ * for (SkTextBlob::RunIterator it(blob); !it.done(); it.next()) {
+ * .....
+ * }
+ */
+class SkTextBlob::RunIterator {
+public:
+ RunIterator(const SkTextBlob* blob);
+
+ bool done() const;
+ void next();
+
+ uint32_t glyphCount() const;
+ const uint16_t* glyphs() const;
+ const SkScalar* pos() const;
+ const SkPoint& offset() const;
+ void applyFontToPaint(SkPaint*) const;
+ GlyphPositioning positioning() const;
+ bool isLCD() const;
+
+private:
+ const RunRecord* fCurrentRun;
+ int fRemainingRuns;
+
+ SkDEBUGCODE(uint8_t* fStorageTop;)
+};
+
+#endif // SkTextBlobPriv_DEFINED

Powered by Google App Engine
This is Rietveld 408576698