| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2006, 2007, 2008, Google Inc. All rights reserved. | 2 * Copyright (c) 2006, 2007, 2008, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 void FontPlatformData::setAntiAlias(bool useAntiAlias) | 65 void FontPlatformData::setAntiAlias(bool useAntiAlias) |
| 66 { | 66 { |
| 67 useSkiaAntiAlias = useAntiAlias; | 67 useSkiaAntiAlias = useAntiAlias; |
| 68 } | 68 } |
| 69 | 69 |
| 70 void FontPlatformData::setSubpixelRendering(bool useSubpixelRendering) | 70 void FontPlatformData::setSubpixelRendering(bool useSubpixelRendering) |
| 71 { | 71 { |
| 72 useSkiaSubpixelRendering = useSubpixelRendering; | 72 useSkiaSubpixelRendering = useSubpixelRendering; |
| 73 } | 73 } |
| 74 | 74 |
| 75 void FontPlatformData::setupPaint(SkPaint* paint, GraphicsContext* context) | 75 void FontPlatformData::setupPaint(SkPaint* paint, GraphicsContext* context, cons
t Font*) const |
| 76 const | |
| 77 { | 76 { |
| 78 paint->setAntiAlias(m_style.useAntiAlias); | 77 paint->setAntiAlias(m_style.useAntiAlias); |
| 79 paint->setHinting(static_cast<SkPaint::Hinting>(m_style.hintStyle)); | 78 paint->setHinting(static_cast<SkPaint::Hinting>(m_style.hintStyle)); |
| 80 paint->setEmbeddedBitmapText(m_style.useBitmaps); | 79 paint->setEmbeddedBitmapText(m_style.useBitmaps); |
| 81 paint->setAutohinted(m_style.useAutoHint); | 80 paint->setAutohinted(m_style.useAutoHint); |
| 82 if (m_style.useAntiAlias) | 81 if (m_style.useAntiAlias) |
| 83 paint->setLCDRenderText(m_style.useSubpixelRendering); | 82 paint->setLCDRenderText(m_style.useSubpixelRendering); |
| 84 | 83 |
| 85 // Do not enable subpixel text on low-dpi if full hinting is requested. | 84 // Do not enable subpixel text on low-dpi if full hinting is requested. |
| 86 bool useSubpixelText = RuntimeEnabledFeatures::subpixelFontScalingEnabled() | 85 bool useSubpixelText = RuntimeEnabledFeatures::subpixelFontScalingEnabled() |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 || LayoutTestSupport::isRunningLayoutTest()) | 138 || LayoutTestSupport::isRunningLayoutTest()) |
| 140 m_style.useSubpixelPositioning = useSkiaSubpixelPositioning; | 139 m_style.useSubpixelPositioning = useSkiaSubpixelPositioning; |
| 141 } | 140 } |
| 142 | 141 |
| 143 bool FontPlatformData::defaultUseSubpixelPositioning() | 142 bool FontPlatformData::defaultUseSubpixelPositioning() |
| 144 { | 143 { |
| 145 return FontDescription::subpixelPositioning(); | 144 return FontDescription::subpixelPositioning(); |
| 146 } | 145 } |
| 147 | 146 |
| 148 } // namespace blink | 147 } // namespace blink |
| OLD | NEW |