OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
6 * Copyright (C) 2010 Igalia, S.L. | 6 * Copyright (C) 2010 Igalia, S.L. |
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
8 * Copyright (C) 2013 Google Inc. All rights reserved. | 8 * Copyright (C) 2013 Google Inc. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 addAbsolutePaintRect(outputRect); | 103 addAbsolutePaintRect(outputRect); |
104 | 104 |
105 // Blur needs space for both input and output pixels in the paint area. | 105 // Blur needs space for both input and output pixels in the paint area. |
106 // Input is also clipped to subregion. | 106 // Input is also clipped to subregion. |
107 if (clipsToBounds()) | 107 if (clipsToBounds()) |
108 inputRect.intersect(maxEffectRect()); | 108 inputRect.intersect(maxEffectRect()); |
109 addAbsolutePaintRect(inputRect); | 109 addAbsolutePaintRect(inputRect); |
110 return outputRect; | 110 return outputRect; |
111 } | 111 } |
112 | 112 |
113 PassRefPtr<SkImageFilter> FEGaussianBlur::createImageFilter(SkiaImageFilterBuild
er* builder) | 113 PassRefPtr<SkImageFilter> FEGaussianBlur::createImageFilter(SkiaImageFilterBuild
er& builder) |
114 { | 114 { |
115 RefPtr<SkImageFilter> input(builder->build(inputEffect(0), operatingColorSpa
ce())); | 115 RefPtr<SkImageFilter> input(builder.build(inputEffect(0), operatingColorSpac
e())); |
116 float stdX = filter()->applyHorizontalScale(m_stdX); | 116 float stdX = filter()->applyHorizontalScale(m_stdX); |
117 float stdY = filter()->applyVerticalScale(m_stdY); | 117 float stdY = filter()->applyVerticalScale(m_stdY); |
118 SkImageFilter::CropRect rect = getCropRect(builder->cropOffset()); | 118 SkImageFilter::CropRect rect = getCropRect(builder.cropOffset()); |
119 return adoptRef(SkBlurImageFilter::Create(SkFloatToScalar(stdX), SkFloatToSc
alar(stdY), input.get(), &rect)); | 119 return adoptRef(SkBlurImageFilter::Create(SkFloatToScalar(stdX), SkFloatToSc
alar(stdY), input.get(), &rect)); |
120 } | 120 } |
121 | 121 |
122 TextStream& FEGaussianBlur::externalRepresentation(TextStream& ts, int indent) c
onst | 122 TextStream& FEGaussianBlur::externalRepresentation(TextStream& ts, int indent) c
onst |
123 { | 123 { |
124 writeIndent(ts, indent); | 124 writeIndent(ts, indent); |
125 ts << "[feGaussianBlur"; | 125 ts << "[feGaussianBlur"; |
126 FilterEffect::externalRepresentation(ts); | 126 FilterEffect::externalRepresentation(ts); |
127 ts << " stdDeviation=\"" << m_stdX << ", " << m_stdY << "\"]\n"; | 127 ts << " stdDeviation=\"" << m_stdX << ", " << m_stdY << "\"]\n"; |
128 inputEffect(0)->externalRepresentation(ts, indent + 1); | 128 inputEffect(0)->externalRepresentation(ts, indent + 1); |
129 return ts; | 129 return ts; |
130 } | 130 } |
131 | 131 |
132 } // namespace blink | 132 } // namespace blink |
OLD | NEW |