| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> |
| 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2009 Google, Inc. All rights reserved. | 5 * Copyright (C) 2009 Google, Inc. All rights reserved. |
| 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 if (!paintServer.isValid()) | 207 if (!paintServer.isValid()) |
| 208 return false; | 208 return false; |
| 209 | 209 |
| 210 if (additionalPaintServerTransform && paintServer.isTransformDependent()) | 210 if (additionalPaintServerTransform && paintServer.isTransformDependent()) |
| 211 paintServer.prependTransform(*additionalPaintServerTransform); | 211 paintServer.prependTransform(*additionalPaintServerTransform); |
| 212 | 212 |
| 213 const SVGComputedStyle& svgStyle = style.svgStyle(); | 213 const SVGComputedStyle& svgStyle = style.svgStyle(); |
| 214 float paintAlpha = resourceMode == ApplyToFillMode ? svgStyle.fillOpacity()
: svgStyle.strokeOpacity(); | 214 float paintAlpha = resourceMode == ApplyToFillMode ? svgStyle.fillOpacity()
: svgStyle.strokeOpacity(); |
| 215 paintServer.applyToSkPaint(paint, paintAlpha); | 215 paintServer.applyToSkPaint(paint, paintAlpha); |
| 216 | 216 |
| 217 paint.setFilterQuality(WebCoreInterpolationQualityToSkFilterQuality(Interpol
ationDefault)); | 217 // We always set filter quality to 'low' here. This value will only have an |
| 218 // effect for patterns, which are SkPictures, so using high-order filter |
| 219 // should have little effect on the overall quality. |
| 220 paint.setFilterQuality(kLow_SkFilterQuality); |
| 218 | 221 |
| 219 // TODO(fs): The color filter can set when generating a picture for a mask - | 222 // TODO(fs): The color filter can set when generating a picture for a mask - |
| 220 // due to color-interpolation. We could also just apply the | 223 // due to color-interpolation. We could also just apply the |
| 221 // color-interpolation property from the the shape itself (which could mean | 224 // color-interpolation property from the the shape itself (which could mean |
| 222 // the paintserver if it has it specified), since that would be more in line | 225 // the paintserver if it has it specified), since that would be more in line |
| 223 // with the spec for color-interpolation. For now, just steal it from the GC | 226 // with the spec for color-interpolation. For now, just steal it from the GC |
| 224 // though. | 227 // though. |
| 225 // Additionally, it's not really safe/guaranteed to be correct, as | 228 // Additionally, it's not really safe/guaranteed to be correct, as |
| 226 // something down the paint pipe may want to farther tweak the color | 229 // something down the paint pipe may want to farther tweak the color |
| 227 // filter, which could yield incorrect results. (Consider just using | 230 // filter, which could yield incorrect results. (Consider just using |
| 228 // saveLayer() w/ this color filter explicitly instead.) | 231 // saveLayer() w/ this color filter explicitly instead.) |
| 229 paint.setColorFilter(paintInfo.context->colorFilter()); | 232 paint.setColorFilter(paintInfo.context->colorFilter()); |
| 230 return true; | 233 return true; |
| 231 } | 234 } |
| 232 | 235 |
| 233 } // namespace blink | 236 } // namespace blink |
| OLD | NEW |