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

Unified Diff: src/core/SkFindAndPlaceGlyph.h

Issue 1438893002: Increment text pointer when the width is zero in the subpixel with center and right alignment. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add test cases for code. Created 5 years, 1 month 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 | « no previous file | tests/DrawTextTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkFindAndPlaceGlyph.h
diff --git a/src/core/SkFindAndPlaceGlyph.h b/src/core/SkFindAndPlaceGlyph.h
index 320caf44f7ca162b7347169df2a33b748a27412f..1dd43a894eee87dbf638207076cedb3f1ec6414d 100644
--- a/src/core/SkFindAndPlaceGlyph.h
+++ b/src/core/SkFindAndPlaceGlyph.h
@@ -308,6 +308,8 @@ private:
const SkGlyph &metricGlyph = fGlyphCacheProc(fCache, &tempText, 0, 0);
if (metricGlyph.fWidth <= 0) {
+ // Exiting early, be sure to update text pointer.
+ *text = tempText;
return;
}
« no previous file with comments | « no previous file | tests/DrawTextTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698