Changeset 62753 in webkit
- Timestamp:
- Jul 7, 2010 9:07:34 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r62741 r62753 1 2010-07-07 Nicolas Weber <thakis@chromium.org> 2 3 Reviewed by Dimitri Glazkov. 4 https://bugs.webkit.org/show_bug.cgi?id=41580 5 6 Fix rendering of radial gradients in skia if both points of the 7 gradient are the same and r0 > 0. 8 9 * fast/gradients/radial-centered.html: Added. 10 1 11 2010-06-18 MORITA Hajime <morrita@google.com> 2 12 -
trunk/WebCore/ChangeLog
r62741 r62753 1 2010-07-07 Nicolas Weber <thakis@chromium.org> 2 3 Reviewed by Dimitri Glazkov. 4 https://bugs.webkit.org/show_bug.cgi?id=41580 5 6 Fix rendering of radial gradients in skia if both points of the 7 gradient are the same and r0 > 0. 8 9 Test: fast/gradients/radial-centered.html 10 11 * platform/graphics/skia/GradientSkia.cpp: 12 (WebCore::Gradient::platformGradient): 13 1 14 2010-06-18 MORITA Hajime <morrita@google.com> 2 15 -
trunk/WebCore/platform/graphics/skia/GradientSkia.cpp
r54503 r62753 155 155 // Since the two-point radial gradient is slower than the plain radial, 156 156 // only use it if we have to. 157 if (m_p0 != m_p1) { 157 if (m_p0 == m_p1 && m_r0 <= 0.0f) { 158 // The radius we give to Skia must be positive (and non-zero). If 159 // we're given a zero radius, just ask for a very small radius so 160 // Skia will still return an object. 161 SkScalar radius = m_r1 > 0 ? WebCoreFloatToSkScalar(m_r1) : SK_ScalarMin; 162 m_gradient = SkGradientShader::CreateRadial(m_p1, radius, colors, pos, static_cast<int>(countUsed), tile); 163 } else { 158 164 // The radii we give to Skia must be positive. If we're given a 159 165 // negative radius, ask for zero instead. … … 161 167 SkScalar radius1 = m_r1 >= 0.0f ? WebCoreFloatToSkScalar(m_r1) : 0; 162 168 m_gradient = SkGradientShader::CreateTwoPointRadial(m_p0, radius0, m_p1, radius1, colors, pos, static_cast<int>(countUsed), tile); 163 } else {164 // The radius we give to Skia must be positive (and non-zero). If165 // we're given a zero radius, just ask for a very small radius so166 // Skia will still return an object.167 SkScalar radius = m_r1 > 0 ? WebCoreFloatToSkScalar(m_r1) : SK_ScalarMin;168 m_gradient = SkGradientShader::CreateRadial(m_p1, radius, colors, pos, static_cast<int>(countUsed), tile);169 169 } 170 170 } else {
Note: See TracChangeset
for help on using the changeset viewer.