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

Unified Diff: Source/core/platform/graphics/mac/FontMac.cpp

Issue 14160005: Track the region where text is painted. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed build on win and mac Created 7 years, 7 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: Source/core/platform/graphics/mac/FontMac.cpp
diff --git a/Source/core/platform/graphics/mac/FontMac.cpp b/Source/core/platform/graphics/mac/FontMac.cpp
index a160edcc37a2fb3d4d7277f8223b15056451667d..7928ef85d4fb50ac6cf5d4e9785df0e5d5f0ea60 100644
--- a/Source/core/platform/graphics/mac/FontMac.cpp
+++ b/Source/core/platform/graphics/mac/FontMac.cpp
@@ -88,7 +88,7 @@ static void setupPaint(SkPaint* paint, const SimpleFontData* fontData, const Fon
// This issue is tracked in https://bugs.webkit.org/show_bug.cgi?id=62989
void Font::drawGlyphs(GraphicsContext* gc, const SimpleFontData* font,
const GlyphBuffer& glyphBuffer, int from, int numGlyphs,
- const FloatPoint& point) const {
+ const FloatPoint& point, const FloatRect& textRect) const {
COMPILE_ASSERT(sizeof(GlyphBufferGlyph) == sizeof(uint16_t), GlyphBufferGlyphSize_equals_uint16_t);
bool shouldSmoothFonts = true;
@@ -152,7 +152,7 @@ void Font::drawGlyphs(GraphicsContext* gc, const SimpleFontData* font,
gc->adjustTextRenderMode(&paint);
paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
- gc->drawPosText(glyphs, numGlyphs * sizeof(uint16_t), pos, paint);
+ gc->drawPosText(glyphs, numGlyphs * sizeof(uint16_t), pos, textRect, paint);
}
if ((textMode & TextModeStroke)
@@ -171,7 +171,7 @@ void Font::drawGlyphs(GraphicsContext* gc, const SimpleFontData* font,
paint.setLooper(0);
}
- gc->drawPosText(glyphs, numGlyphs * sizeof(uint16_t), pos, paint);
+ gc->drawPosText(glyphs, numGlyphs * sizeof(uint16_t), pos, textRect, paint);
}
if (font->platformData().orientation() == Vertical)
gc->restore();
« no previous file with comments | « Source/core/platform/graphics/mac/FontComplexTextMac.cpp ('k') | Source/core/platform/graphics/skia/SkiaFontWin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698