| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) | 4 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 5 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
| 7 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> | 7 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> |
| 8 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 8 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
| 9 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. | 9 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. |
| 10 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 10 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 // Currently, SkPictureImageFilter does not support subpixel text | 824 // Currently, SkPictureImageFilter does not support subpixel text |
| 825 // anti-aliasing, which is expected when !creationAttributes().alpha(), so we | 825 // anti-aliasing, which is expected when !creationAttributes().alpha(), so we |
| 826 // need to fall out of display list mode when drawing text to an opaque | 826 // need to fall out of display list mode when drawing text to an opaque |
| 827 // canvas. crbug.com/583809 | 827 // canvas. crbug.com/583809 |
| 828 if (!creationAttributes().alpha() && !isAccelerated()) { | 828 if (!creationAttributes().alpha() && !isAccelerated()) { |
| 829 canvas()->disableDeferral( | 829 canvas()->disableDeferral( |
| 830 DisableDeferralReasonSubPixelTextAntiAliasingSupport); | 830 DisableDeferralReasonSubPixelTextAntiAliasingSupport); |
| 831 } | 831 } |
| 832 | 832 |
| 833 const Font& font = accessFont(); | 833 const Font& font = accessFont(); |
| 834 font.getFontDescription().setSubpixelAscentDescent(true); | |
| 835 const SimpleFontData* fontData = font.primaryFont(); | 834 const SimpleFontData* fontData = font.primaryFont(); |
| 836 DCHECK(fontData); | 835 DCHECK(fontData); |
| 837 if (!fontData) | 836 if (!fontData) |
| 838 return; | 837 return; |
| 839 const FontMetrics& fontMetrics = fontData->getFontMetrics(); | 838 const FontMetrics& fontMetrics = fontData->getFontMetrics(); |
| 840 | 839 |
| 841 // FIXME: Need to turn off font smoothing. | 840 // FIXME: Need to turn off font smoothing. |
| 842 | 841 |
| 843 const ComputedStyle* computedStyle = 0; | 842 const ComputedStyle* computedStyle = 0; |
| 844 TextDirection direction = | 843 TextDirection direction = |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1159 } | 1158 } |
| 1160 return true; | 1159 return true; |
| 1161 } | 1160 } |
| 1162 | 1161 |
| 1163 void CanvasRenderingContext2D::resetUsageTracking() { | 1162 void CanvasRenderingContext2D::resetUsageTracking() { |
| 1164 UsageCounters newCounters; | 1163 UsageCounters newCounters; |
| 1165 m_usageCounters = newCounters; | 1164 m_usageCounters = newCounters; |
| 1166 } | 1165 } |
| 1167 | 1166 |
| 1168 } // namespace blink | 1167 } // namespace blink |
| OLD | NEW |