Changeset 280654 in webkit
- Timestamp:
- Aug 4, 2021, 1:28:16 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/cairo/GradientCairo.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r280648 r280654 1 2021-08-04 Miguel Gomez <magomez@igalia.com> 2 3 [GTK][WPE] Elliptic radial gradients are not working 4 https://bugs.webkit.org/show_bug.cgi?id=228771 5 6 Reviewed by Žan Doberšek. 7 8 Transform the radial circular gradients using the aspect ratio to convert 9 them into the appropriate elliptic gradients. 10 11 * platform/graphics/cairo/GradientCairo.cpp: 12 (WebCore::Gradient::createPattern): 13 1 14 2021-08-04 Devin Rousso <drousso@apple.com> 2 15 -
trunk/Source/WebCore/platform/graphics/cairo/GradientCairo.cpp
r279941 r280654 196 196 RefPtr<cairo_pattern_t> Gradient::createPattern(float globalAlpha, const AffineTransform& gradientSpaceTransform) 197 197 { 198 cairo_matrix_t matrix = toCairoMatrix(gradientSpaceTransform); 199 cairo_matrix_invert(&matrix); 200 198 201 auto gradient = WTF::switchOn(m_data, 199 202 [&] (const LinearData& data) { … … 207 210 for (auto& stop : stops()) 208 211 addColorStopRGBA(gradient.get(), stop, globalAlpha); 212 213 if (data.aspectRatio != 1) { 214 cairo_matrix_translate(&matrix, data.point0.x(), data.point0.y()); 215 cairo_matrix_scale(&matrix, 1.0, data.aspectRatio); 216 cairo_matrix_translate(&matrix, -data.point0.x(), -data.point0.y()); 217 } 218 209 219 return gradient; 210 220 }, … … 231 241 } 232 242 233 cairo_matrix_t matrix = toCairoMatrix(gradientSpaceTransform);234 cairo_matrix_invert(&matrix);235 243 cairo_pattern_set_matrix(gradient.get(), &matrix); 236 244
Note:
See TracChangeset
for help on using the changeset viewer.