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

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: rebase w/head 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
« no previous file with comments | « Source/platform/graphics/GraphicsContext.h ('k') | Source/web/PageWidgetDelegate.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContext.cpp
diff --git a/Source/platform/graphics/GraphicsContext.cpp b/Source/platform/graphics/GraphicsContext.cpp
index 8bc2c43e88346c6b13bf2fcd094bba8435e882ea..adfd4a7371d518ed6b13c261c19704a08949ebb3 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;
« no previous file with comments | « Source/platform/graphics/GraphicsContext.h ('k') | Source/web/PageWidgetDelegate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698