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

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

Issue 724063004: Simplify GraphicsContext::couldUseLCDRenderedText() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: let's cut deeper 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 | Source/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContext.h
diff --git a/Source/platform/graphics/GraphicsContext.h b/Source/platform/graphics/GraphicsContext.h
index 8896ba35491abd0141c2d55232afa271d8293ac7..065157ca082ece107e1387444ebd7c4abd7419b5 100644
--- a/Source/platform/graphics/GraphicsContext.h
+++ b/Source/platform/graphics/GraphicsContext.h
@@ -155,11 +155,10 @@ public:
// FIXME: the setter is only used once, at construction time; convert to a constructor param,
// and possibly consolidate with other flags (paintDisabled, isPrinting, ...)
void setShouldSmoothFonts(bool smoothFonts) { m_shouldSmoothFonts = smoothFonts; }
- bool shouldSmoothFonts() const { return m_shouldSmoothFonts; }
// Turn off LCD text for the paint if not supported on this context.
void adjustTextRenderMode(SkPaint*) const;
- bool couldUseLCDRenderedText() const;
+ bool couldUseLCDRenderedText() const { return m_isCertainlyOpaque && m_shouldSmoothFonts; }
void setTextDrawingMode(TextDrawingModeFlags mode) { mutableState()->setTextDrawingMode(mode); }
TextDrawingModeFlags textDrawingMode() const { return immutableState()->textDrawingMode(); }
@@ -188,7 +187,6 @@ public:
// the canvas may have transparency (as is the case when rendering
// to a canvas object).
void setCertainlyOpaque(bool isOpaque) { m_isCertainlyOpaque = isOpaque; }
- bool isCertainlyOpaque() const { return m_isCertainlyOpaque; }
// Returns if the context is a printing context instead of a display
// context. Bitmap shouldn't be resampled when printing to keep the best
« no previous file with comments | « no previous file | Source/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698