OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
55 Filter* filter = this->filter(); | 55 Filter* filter = this->filter(); |
56 ASSERT(filter); | 56 ASSERT(filter); |
57 | 57 |
58 FloatRect offsetRect = rect; | 58 FloatRect offsetRect = rect; |
59 if (forward) | 59 if (forward) |
60 offsetRect.move(filter->applyHorizontalScale(m_dx), filter->applyVertica lScale(m_dy)); | 60 offsetRect.move(filter->applyHorizontalScale(m_dx), filter->applyVertica lScale(m_dy)); |
61 else | 61 else |
62 offsetRect.move(-filter->applyHorizontalScale(m_dx), -filter->applyVerti calScale(m_dy)); | 62 offsetRect.move(-filter->applyHorizontalScale(m_dx), -filter->applyVerti calScale(m_dy)); |
63 result.unite(offsetRect); | 63 result.unite(offsetRect); |
64 | 64 |
65 unsigned kernelSizeX = 0; | 65 IntSize kernelSize(0, 0); |
pdr.
2014/03/26 00:00:13
Is this needed?
Savago
2014/03/26 00:12:24
Just checked IntSize() and it already initializes
| |
66 unsigned kernelSizeY = 0; | 66 kernelSize = FEGaussianBlur::calculateKernelSize(filter, m_stdX, m_stdY); |
67 FEGaussianBlur::calculateKernelSize(filter, kernelSizeX, kernelSizeY, m_stdX , m_stdY); | |
68 | 67 |
69 // We take the half kernel size and multiply it with three, because we run b ox blur three times. | 68 // We take the half kernel size and multiply it with three, because we run b ox blur three times. |
70 result.inflateX(3 * kernelSizeX * 0.5f); | 69 result.inflateX(3 * kernelSize.width() * 0.5f); |
71 result.inflateY(3 * kernelSizeY * 0.5f); | 70 result.inflateY(3 * kernelSize.height() * 0.5f); |
72 return result; | 71 return result; |
73 } | 72 } |
74 | 73 |
75 void FEDropShadow::applySoftware() | 74 void FEDropShadow::applySoftware() |
76 { | 75 { |
77 FilterEffect* in = inputEffect(0); | 76 FilterEffect* in = inputEffect(0); |
78 | 77 |
79 ImageBuffer* resultImage = createImageBufferResult(); | 78 ImageBuffer* resultImage = createImageBufferResult(); |
80 if (!resultImage) | 79 if (!resultImage) |
81 return; | 80 return; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 { | 122 { |
124 writeIndent(ts, indent); | 123 writeIndent(ts, indent); |
125 ts << "[feDropShadow"; | 124 ts << "[feDropShadow"; |
126 FilterEffect::externalRepresentation(ts); | 125 FilterEffect::externalRepresentation(ts); |
127 ts << " stdDeviation=\"" << m_stdX << ", " << m_stdY << "\" dx=\"" << m_dx < < "\" dy=\"" << m_dy << "\" flood-color=\"" << m_shadowColor.nameForRenderTreeAs Text() <<"\" flood-opacity=\"" << m_shadowOpacity << "]\n"; | 126 ts << " stdDeviation=\"" << m_stdX << ", " << m_stdY << "\" dx=\"" << m_dx < < "\" dy=\"" << m_dy << "\" flood-color=\"" << m_shadowColor.nameForRenderTreeAs Text() <<"\" flood-opacity=\"" << m_shadowOpacity << "]\n"; |
128 inputEffect(0)->externalRepresentation(ts, indent + 1); | 127 inputEffect(0)->externalRepresentation(ts, indent + 1); |
129 return ts; | 128 return ts; |
130 } | 129 } |
131 | 130 |
132 } // namespace WebCore | 131 } // namespace WebCore |
OLD | NEW |