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

Unified Diff: Source/platform/fonts/mac/FontMac.cpp

Issue 311193009: Replace GraphicsContext::setupPaintFor* with const getters. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/harfbuzz/FontHarfBuzz.cpp ('k') | Source/platform/graphics/GraphicsContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/mac/FontMac.cpp
diff --git a/Source/platform/fonts/mac/FontMac.cpp b/Source/platform/fonts/mac/FontMac.cpp
index 1b4aeb4c0c6650cb87e2b230dcaba0e4cbd7c021..5ce7c8aaec62473b479306350397bee9b07b987c 100644
--- a/Source/platform/fonts/mac/FontMac.cpp
+++ b/Source/platform/fonts/mac/FontMac.cpp
@@ -142,8 +142,7 @@ void Font::drawGlyphs(GraphicsContext* gc, const SimpleFontData* font,
// We draw text up to two times (once for fill, once for stroke).
if (textMode & TextModeFill) {
- SkPaint paint;
- gc->setupPaintForFilling(&paint);
+ SkPaint paint = gc->fillPaint();
setupPaint(&paint, font, this, shouldAntialias, shouldSmoothFonts);
gc->adjustTextRenderMode(&paint);
paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
@@ -155,8 +154,7 @@ void Font::drawGlyphs(GraphicsContext* gc, const SimpleFontData* font,
&& gc->strokeStyle() != NoStroke
&& gc->strokeThickness() > 0) {
- SkPaint paint;
- gc->setupPaintForStroking(&paint);
+ SkPaint paint = gc->strokePaint();
setupPaint(&paint, font, this, shouldAntialias, shouldSmoothFonts);
gc->adjustTextRenderMode(&paint);
paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
« no previous file with comments | « Source/platform/fonts/harfbuzz/FontHarfBuzz.cpp ('k') | Source/platform/graphics/GraphicsContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698