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

Unified Diff: Source/platform/fonts/Font.cpp

Issue 692643007: [TextBlob] Plumb a Font param for setupPaint(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/Font.cpp
diff --git a/Source/platform/fonts/Font.cpp b/Source/platform/fonts/Font.cpp
index 2bfc2c6419fa21095e7f4664748ad80efa54745c..d89a35061f66d29b51fc9639255d031bf9ea29ea 100644
--- a/Source/platform/fonts/Font.cpp
+++ b/Source/platform/fonts/Font.cpp
@@ -263,7 +263,7 @@ namespace {
template <bool hasOffsets>
bool buildTextBlobInternal(const GlyphBuffer& glyphBuffer, SkScalar initialAdvance,
- const SkRect* bounds, bool couldUseLCD, SkTextBlobBuilder& builder)
+ const SkRect* bounds, bool couldUseLCD, SkTextBlobBuilder& builder, const Font& font)
{
SkScalar x = initialAdvance;
unsigned i = 0;
@@ -278,7 +278,7 @@ bool buildTextBlobInternal(const GlyphBuffer& glyphBuffer, SkScalar initialAdvan
// factor, which is found via the GraphicsContext. This should be fixed
// to avoid correctness problems here.
SkPaint paint;
- fontData->platformData().setupPaint(&paint);
+ fontData->platformData().setupPaint(&paint, 0, &font);
paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
// FIXME: this should go away after the big LCD cleanup.
@@ -324,8 +324,8 @@ PassTextBlobPtr Font::buildTextBlob(const GlyphBuffer& glyphBuffer, float initia
SkRect skBounds = bounds;
bool success = glyphBuffer.hasOffsets() ?
- buildTextBlobInternal<true>(glyphBuffer, advance, &skBounds, couldUseLCD, builder) :
- buildTextBlobInternal<false>(glyphBuffer, advance, &skBounds, couldUseLCD, builder);
+ buildTextBlobInternal<true>(glyphBuffer, advance, &skBounds, couldUseLCD, builder, *this) :
+ buildTextBlobInternal<false>(glyphBuffer, advance, &skBounds, couldUseLCD, builder, *this);
return success ? adoptRef(builder.build()) : nullptr;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698