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

Side by Side Diff: Source/platform/graphics/GraphicsContext.h

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2008-2009 Torch Mobile, Inc. 3 * Copyright (C) 2008-2009 Torch Mobile, Inc.
4 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 return alpha > 255 ? 255 : alpha; 190 return alpha > 255 ? 255 : alpha;
191 } 191 }
192 192
193 void setImageInterpolationQuality(InterpolationQuality quality) { mutableSta te()->setInterpolationQuality(quality); } 193 void setImageInterpolationQuality(InterpolationQuality quality) { mutableSta te()->setInterpolationQuality(quality); }
194 InterpolationQuality imageInterpolationQuality() const { return immutableSta te()->interpolationQuality(); } 194 InterpolationQuality imageInterpolationQuality() const { return immutableSta te()->interpolationQuality(); }
195 195
196 void setCompositeOperation(CompositeOperator, blink::WebBlendMode = blink::W ebBlendModeNormal); 196 void setCompositeOperation(CompositeOperator, blink::WebBlendMode = blink::W ebBlendModeNormal);
197 CompositeOperator compositeOperation() const { return immutableState()->comp ositeOperator(); } 197 CompositeOperator compositeOperation() const { return immutableState()->comp ositeOperator(); }
198 blink::WebBlendMode blendModeOperation() const { return immutableState()->bl endMode(); } 198 blink::WebBlendMode blendModeOperation() const { return immutableState()->bl endMode(); }
199 199
200 // Change the way document markers are rendered. 200 // Speicy the device scale factor which may change the way document markers
201 // Any deviceScaleFactor higher than 1.5 is enough to justify setting this f lag. 201 // and fonts are rendered.
202 void setUseHighResMarkers(bool isHighRes) { m_useHighResMarker = isHighRes; } 202 void setDeviceScaleFactor(float factor) { m_deviceScaleFactor = factor; }
203 float deviceScaleFactor() const { return m_deviceScaleFactor; }
203 204
204 // If true we are (most likely) rendering to a web page and the 205 // If true we are (most likely) rendering to a web page and the
205 // canvas has been prepared with an opaque background. If false, 206 // canvas has been prepared with an opaque background. If false,
206 // the canvas may have transparency (as is the case when rendering 207 // the canvas may have transparency (as is the case when rendering
207 // to a canvas object). 208 // to a canvas object).
208 void setCertainlyOpaque(bool isOpaque) { m_isCertainlyOpaque = isOpaque; } 209 void setCertainlyOpaque(bool isOpaque) { m_isCertainlyOpaque = isOpaque; }
209 bool isCertainlyOpaque() const { return m_isCertainlyOpaque; } 210 bool isCertainlyOpaque() const { return m_isCertainlyOpaque; }
210 211
211 // Returns if the context is a printing context instead of a display 212 // Returns if the context is a printing context instead of a display
212 // context. Bitmap shouldn't be resampled when printing to keep the best 213 // context. Bitmap shouldn't be resampled when printing to keep the best
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 bool m_disableDestructionChecks; 507 bool m_disableDestructionChecks;
507 #endif 508 #endif
508 // Tracks the region painted opaque via the GraphicsContext. 509 // Tracks the region painted opaque via the GraphicsContext.
509 OpaqueRegionSkia m_opaqueRegion; 510 OpaqueRegionSkia m_opaqueRegion;
510 511
511 // Tracks the region where text is painted via the GraphicsContext. 512 // Tracks the region where text is painted via the GraphicsContext.
512 SkRect m_textRegion; 513 SkRect m_textRegion;
513 514
514 unsigned m_disabledState; 515 unsigned m_disabledState;
515 516
517 float m_deviceScaleFactor;
518
516 // Activation for the above region tracking features 519 // Activation for the above region tracking features
517 bool m_trackOpaqueRegion : 1; 520 bool m_trackOpaqueRegion : 1;
518 bool m_trackTextRegion : 1; 521 bool m_trackTextRegion : 1;
519 522
520 // Are we on a high DPI display? If so, spelling and grammar markers are lar ger.
521 bool m_useHighResMarker : 1;
522 // FIXME: Make this go away: crbug.com/236892 523 // FIXME: Make this go away: crbug.com/236892
523 bool m_updatingControlTints : 1; 524 bool m_updatingControlTints : 1;
524 bool m_accelerated : 1; 525 bool m_accelerated : 1;
525 bool m_isCertainlyOpaque : 1; 526 bool m_isCertainlyOpaque : 1;
526 bool m_printing : 1; 527 bool m_printing : 1;
527 bool m_antialiasHairlineImages : 1; 528 bool m_antialiasHairlineImages : 1;
528 }; 529 };
529 530
530 } // namespace WebCore 531 } // namespace WebCore
531 532
532 #endif // GraphicsContext_h 533 #endif // GraphicsContext_h
OLDNEW
« no previous file with comments | « Source/platform/fonts/linux/FontPlatformDataLinux.cpp ('k') | Source/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698