| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "platform/graphics/GraphicsContextState.h" | 6 #include "platform/graphics/GraphicsContextState.h" |
| 7 | 7 |
| 8 #include "platform/graphics/skia/SkiaUtils.h" |
| 9 |
| 8 namespace blink { | 10 namespace blink { |
| 9 | 11 |
| 10 static inline SkFilterQuality filterQualityForPaint(InterpolationQuality quality
) | 12 static inline SkFilterQuality filterQualityForPaint(InterpolationQuality quality
) |
| 11 { | 13 { |
| 12 // The filter quality "selected" here will primarily be used when painting a | 14 // The filter quality "selected" here will primarily be used when painting a |
| 13 // primitive using one of the SkPaints below. For the most part this will | 15 // primitive using one of the SkPaints below. For the most part this will |
| 14 // not affect things that are part of the Image class hierarchy (which use | 16 // not affect things that are part of the Image class hierarchy (which use |
| 15 // the unmodified m_interpolationQuality.) | 17 // the unmodified m_interpolationQuality.) |
| 16 return quality != InterpolationNone ? kLow_SkFilterQuality : kNone_SkFilterQ
uality; | 18 return quality != InterpolationNone ? kLow_SkFilterQuality : kNone_SkFilterQ
uality; |
| 17 } | 19 } |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 } | 171 } |
| 170 | 172 |
| 171 void GraphicsContextState::setShouldAntialias(bool shouldAntialias) | 173 void GraphicsContextState::setShouldAntialias(bool shouldAntialias) |
| 172 { | 174 { |
| 173 m_shouldAntialias = shouldAntialias; | 175 m_shouldAntialias = shouldAntialias; |
| 174 m_strokePaint.setAntiAlias(shouldAntialias); | 176 m_strokePaint.setAntiAlias(shouldAntialias); |
| 175 m_fillPaint.setAntiAlias(shouldAntialias); | 177 m_fillPaint.setAntiAlias(shouldAntialias); |
| 176 } | 178 } |
| 177 | 179 |
| 178 } // namespace blink | 180 } // namespace blink |
| OLD | NEW |