| OLD | NEW |
| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 129 |
| 130 SkDrawLooper* drawLooper() const { return immutableState()->drawLooper(); } | 130 SkDrawLooper* drawLooper() const { return immutableState()->drawLooper(); } |
| 131 | 131 |
| 132 FloatRect getClipBounds() const; | 132 FloatRect getClipBounds() const; |
| 133 bool getTransformedClipBounds(FloatRect* bounds) const; | 133 bool getTransformedClipBounds(FloatRect* bounds) const; |
| 134 SkMatrix getTotalMatrix() const; | 134 SkMatrix getTotalMatrix() const; |
| 135 | 135 |
| 136 void setShouldAntialias(bool antialias) { mutableState()->setShouldAntialias
(antialias); } | 136 void setShouldAntialias(bool antialias) { mutableState()->setShouldAntialias
(antialias); } |
| 137 bool shouldAntialias() const { return immutableState()->shouldAntialias(); } | 137 bool shouldAntialias() const { return immutableState()->shouldAntialias(); } |
| 138 | 138 |
| 139 // Disable the anti-aliasing optimization for scales/multiple-of-90-degrees |
| 140 // rotations of thin ("hairline") images. |
| 141 // Note: This will only be reliable when the device pixel scale/ratio is |
| 142 // fixed (e.g. when drawing to context backed by an ImageBuffer). |
| 143 void disableAntialiasingOptimizationForHairlineImages() { ASSERT(!isRecordin
g()); m_antialiasHairlineImages = true; } |
| 144 bool shouldAntialiasHairlineImages() const { return m_antialiasHairlineImage
s; } |
| 145 |
| 139 void setShouldClampToSourceRect(bool clampToSourceRect) { mutableState()->se
tShouldClampToSourceRect(clampToSourceRect); } | 146 void setShouldClampToSourceRect(bool clampToSourceRect) { mutableState()->se
tShouldClampToSourceRect(clampToSourceRect); } |
| 140 bool shouldClampToSourceRect() const { return immutableState()->shouldClampT
oSourceRect(); } | 147 bool shouldClampToSourceRect() const { return immutableState()->shouldClampT
oSourceRect(); } |
| 141 | 148 |
| 142 void setShouldSmoothFonts(bool smoothFonts) { mutableState()->setShouldSmoot
hFonts(smoothFonts); } | 149 void setShouldSmoothFonts(bool smoothFonts) { mutableState()->setShouldSmoot
hFonts(smoothFonts); } |
| 143 bool shouldSmoothFonts() const { return immutableState()->shouldSmoothFonts(
); } | 150 bool shouldSmoothFonts() const { return immutableState()->shouldSmoothFonts(
); } |
| 144 | 151 |
| 145 // Turn off LCD text for the paint if not supported on this context. | 152 // Turn off LCD text for the paint if not supported on this context. |
| 146 void adjustTextRenderMode(SkPaint*); | 153 void adjustTextRenderMode(SkPaint*); |
| 147 bool couldUseLCDRenderedText(); | 154 bool couldUseLCDRenderedText(); |
| 148 | 155 |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 bool m_trackTextRegion : 1; | 504 bool m_trackTextRegion : 1; |
| 498 SkRect m_textRegion; | 505 SkRect m_textRegion; |
| 499 | 506 |
| 500 // Are we on a high DPI display? If so, spelling and grammar markers are lar
ger. | 507 // Are we on a high DPI display? If so, spelling and grammar markers are lar
ger. |
| 501 bool m_useHighResMarker : 1; | 508 bool m_useHighResMarker : 1; |
| 502 // FIXME: Make this go away: crbug.com/236892 | 509 // FIXME: Make this go away: crbug.com/236892 |
| 503 bool m_updatingControlTints : 1; | 510 bool m_updatingControlTints : 1; |
| 504 bool m_accelerated : 1; | 511 bool m_accelerated : 1; |
| 505 bool m_isCertainlyOpaque : 1; | 512 bool m_isCertainlyOpaque : 1; |
| 506 bool m_printing : 1; | 513 bool m_printing : 1; |
| 514 bool m_antialiasHairlineImages : 1; |
| 507 }; | 515 }; |
| 508 | 516 |
| 509 } // namespace WebCore | 517 } // namespace WebCore |
| 510 | 518 |
| 511 #endif // GraphicsContext_h | 519 #endif // GraphicsContext_h |
| OLD | NEW |