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

Unified Diff: src/core/SkTextBlob.cpp

Issue 1411723005: Make SkTextBlob::RunIterator public. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-10-27 (Tuesday) 16:20:53 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
« no previous file with comments | « src/core/SkDevice.cpp ('k') | src/core/SkTextBlobRunIterator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTextBlob.cpp
diff --git a/src/core/SkTextBlob.cpp b/src/core/SkTextBlob.cpp
index 7fd96ad8b284b1ed9625b4ab7a91dcf6e956828f..ed26f43db8f68eb35e19aa894dd398c3b4079715 100644
--- a/src/core/SkTextBlob.cpp
+++ b/src/core/SkTextBlob.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkTextBlob.h"
+#include "SkTextBlobRunIterator.h"
#include "SkReadBuffer.h"
#include "SkTypeface.h"
@@ -220,7 +220,7 @@ void SkTextBlob::flatten(SkWriteBuffer& buffer) const {
buffer.writeRect(fBounds);
SkPaint runPaint;
- RunIterator it(this);
+ SkTextBlobRunIterator it(this);
while (!it.done()) {
SkASSERT(it.glyphCount() > 0);
@@ -294,58 +294,58 @@ unsigned SkTextBlob::ScalarsPerGlyph(GlyphPositioning pos) {
return pos;
}
-SkTextBlob::RunIterator::RunIterator(const SkTextBlob* blob)
- : fCurrentRun(RunRecord::First(blob))
+SkTextBlobRunIterator::SkTextBlobRunIterator(const SkTextBlob* blob)
+ : fCurrentRun(SkTextBlob::RunRecord::First(blob))
, fRemainingRuns(blob->fRunCount) {
SkDEBUGCODE(fStorageTop = (uint8_t*)blob + blob->fStorageSize;)
}
-bool SkTextBlob::RunIterator::done() const {
+bool SkTextBlobRunIterator::done() const {
return fRemainingRuns <= 0;
}
-void SkTextBlob::RunIterator::next() {
+void SkTextBlobRunIterator::next() {
SkASSERT(!this->done());
if (!this->done()) {
SkDEBUGCODE(fCurrentRun->validate(fStorageTop);)
- fCurrentRun = RunRecord::Next(fCurrentRun);
+ fCurrentRun = SkTextBlob::RunRecord::Next(fCurrentRun);
fRemainingRuns--;
}
}
-uint32_t SkTextBlob::RunIterator::glyphCount() const {
+uint32_t SkTextBlobRunIterator::glyphCount() const {
SkASSERT(!this->done());
return fCurrentRun->glyphCount();
}
-const uint16_t* SkTextBlob::RunIterator::glyphs() const {
+const uint16_t* SkTextBlobRunIterator::glyphs() const {
SkASSERT(!this->done());
return fCurrentRun->glyphBuffer();
}
-const SkScalar* SkTextBlob::RunIterator::pos() const {
+const SkScalar* SkTextBlobRunIterator::pos() const {
SkASSERT(!this->done());
return fCurrentRun->posBuffer();
}
-const SkPoint& SkTextBlob::RunIterator::offset() const {
+const SkPoint& SkTextBlobRunIterator::offset() const {
SkASSERT(!this->done());
return fCurrentRun->offset();
}
-SkTextBlob::GlyphPositioning SkTextBlob::RunIterator::positioning() const {
+SkTextBlob::GlyphPositioning SkTextBlobRunIterator::positioning() const {
SkASSERT(!this->done());
return fCurrentRun->positioning();
}
-void SkTextBlob::RunIterator::applyFontToPaint(SkPaint* paint) const {
+void SkTextBlobRunIterator::applyFontToPaint(SkPaint* paint) const {
SkASSERT(!this->done());
fCurrentRun->font().applyToPaint(paint);
}
-bool SkTextBlob::RunIterator::isLCD() const {
+bool SkTextBlobRunIterator::isLCD() const {
return SkToBool(fCurrentRun->font().flags() & SkPaint::kLCDRenderText_Flag);
}
« no previous file with comments | « src/core/SkDevice.cpp ('k') | src/core/SkTextBlobRunIterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698