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

Unified Diff: Source/platform/graphics/GraphicsContext.cpp

Issue 645363003: Consolidate most simple vs. complex Font methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: minor cleanup Created 6 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 | « Source/platform/fonts/shaping/HarfBuzzShaper.cpp ('k') | Source/platform/text/TextRun.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContext.cpp
diff --git a/Source/platform/graphics/GraphicsContext.cpp b/Source/platform/graphics/GraphicsContext.cpp
index 5f07bcf9a1d9c3c08b3e8269a11d552145ecbcfd..1fdbb54a9eca53d367f662b2f557efa68680b116 100644
--- a/Source/platform/graphics/GraphicsContext.cpp
+++ b/Source/platform/graphics/GraphicsContext.cpp
@@ -1038,7 +1038,6 @@ void GraphicsContext::drawBidiText(const Font& font, const TextRunPaintInfo& run
FloatPoint currPoint = point;
BidiCharacterRun* bidiRun = bidiRuns.firstRun();
- float width = 0;
while (bidiRun) {
TextRun subrun = run.subRun(bidiRun->start(), bidiRun->stop() - bidiRun->start());
bool isRTL = bidiRun->level() % 2;
@@ -1047,12 +1046,10 @@ void GraphicsContext::drawBidiText(const Font& font, const TextRunPaintInfo& run
TextRunPaintInfo subrunInfo(subrun);
subrunInfo.bounds = runInfo.bounds;
- width = font.drawText(this, subrunInfo, currPoint, customFontNotReadyAction);
-
+ float runWidth = font.drawUncachedText(this, subrunInfo, currPoint, customFontNotReadyAction);
bidiRun = bidiRun->next();
- if (bidiRun)
- currPoint.move(width, 0);
+ currPoint.move(runWidth, 0);
}
bidiRuns.deleteRuns();
« no previous file with comments | « Source/platform/fonts/shaping/HarfBuzzShaper.cpp ('k') | Source/platform/text/TextRun.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698