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

Unified Diff: sky/engine/platform/graphics/GraphicsContext.cpp

Issue 859203002: Merge Blink code to cache SkTextBlob (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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: sky/engine/platform/graphics/GraphicsContext.cpp
diff --git a/sky/engine/platform/graphics/GraphicsContext.cpp b/sky/engine/platform/graphics/GraphicsContext.cpp
index a0a8870f9ad8ae5f73390d31bcaecf0f543e050b..8323246b1c8f34f194ac49adaf671edff658af27 100644
--- a/sky/engine/platform/graphics/GraphicsContext.cpp
+++ b/sky/engine/platform/graphics/GraphicsContext.cpp
@@ -918,12 +918,10 @@ void GraphicsContext::drawBidiText(const Font& font, const TextRunPaintInfo& run
TextRunPaintInfo subrunInfo(subrun);
subrunInfo.bounds = runInfo.bounds;
- font.drawText(this, subrunInfo, currPoint, customFontNotReadyAction);
+ float runWidth = font.drawUncachedText(this, subrunInfo, currPoint, customFontNotReadyAction);
bidiRun = bidiRun->next();
- // FIXME: Have Font::drawText return the width of what it drew so that we don't have to re-measure here.
- if (bidiRun)
- currPoint.move(font.width(subrun), 0);
+ currPoint.move(runWidth, 0);
}
bidiRuns.deleteRuns();

Powered by Google App Engine
This is Rietveld 408576698