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

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

Issue 407553002: [Linux] Enable subpixel text on high-dpi regardless of hinting (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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/platform/graphics/GraphicsContext.cpp
diff --git a/Source/platform/graphics/GraphicsContext.cpp b/Source/platform/graphics/GraphicsContext.cpp
index 0d60ab5ea5016517e80d54591797bf3c2151678e..e5d9593475a3bf162de8d4b8ab53aeea7e7ddf29 100644
--- a/Source/platform/graphics/GraphicsContext.cpp
+++ b/Source/platform/graphics/GraphicsContext.cpp
@@ -123,9 +123,9 @@ GraphicsContext::GraphicsContext(SkCanvas* canvas, DisabledMode disableContextOr
, m_disableDestructionChecks(false)
#endif
, m_disabledState(disableContextOrPainting)
+ , m_deviceScaleFactor(1.0f)
, m_trackOpaqueRegion(false)
, m_trackTextRegion(false)
- , m_useHighResMarker(false)
, m_updatingControlTints(false)
, m_accelerated(false)
, m_isCertainlyOpaque(true)
@@ -725,7 +725,8 @@ void GraphicsContext::drawLineForDocumentMarker(const FloatPoint& pt, float widt
if (contextDisabled())
return;
- int deviceScaleFactor = m_useHighResMarker ? 2 : 1;
+ // Use 2x resources for a device scale factor of 1.5 or above.
+ int deviceScaleFactor = m_deviceScaleFactor > 1.5f ? 2 : 1;
// Create the pattern we'll use to draw the underline.
int index = style == DocumentMarkerGrammarLineStyle ? 1 : 0;

Powered by Google App Engine
This is Rietveld 408576698