Log Message
[Cairo] fillRectWithColor with Color::transparent doesn't perform anything https://bugs.webkit.org/show_bug.cgi?id=101911
Patch by Hurnjoo Lee <hurnjoo....@samsung.com> on 2012-11-26 Reviewed by Kenneth Rohde Christiansen. fillRectWithColor with Color::transparent doesn't perform anything because fillRectWithColor does early-return if the alpha value of color is zero. But we expect that fill the rect with transparent color in case the cairo_operator is CAIRO_OPERATOR_SOURCE. Covered by existing tests. * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::fillRectWithColor):Add condition to prevent early-return if cairo_operator is not CAIRO_OPERATOR_OVER
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (135736 => 135737)
--- trunk/Source/WebCore/ChangeLog 2012-11-26 18:47:18 UTC (rev 135736)
+++ trunk/Source/WebCore/ChangeLog 2012-11-26 18:49:54 UTC (rev 135737)
@@ -1,3 +1,21 @@
+2012-11-26 Hurnjoo Lee <hurnjoo....@samsung.com>
+
+ [Cairo] fillRectWithColor with Color::transparent doesn't perform anything
+ https://bugs.webkit.org/show_bug.cgi?id=101911
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ fillRectWithColor with Color::transparent doesn't perform anything
+ because fillRectWithColor does early-return if the alpha value of
+ color is zero. But we expect that fill the rect with transparent color
+ in case the cairo_operator is CAIRO_OPERATOR_SOURCE.
+
+ Covered by existing tests.
+
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::fillRectWithColor):Add condition to prevent early-return if
+ cairo_operator is not CAIRO_OPERATOR_OVER
+
2012-11-26 Jae Hyun Park <jae.p...@company100.net>
Remove redundant assignment in TextureMapperLayer::flushCompositingStateSelf
Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp (135736 => 135737)
--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp 2012-11-26 18:47:18 UTC (rev 135736)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp 2012-11-26 18:49:54 UTC (rev 135737)
@@ -70,7 +70,7 @@
// A helper which quickly fills a rectangle with a simple color fill.
static inline void fillRectWithColor(cairo_t* cr, const FloatRect& rect, const Color& color)
{
- if (!color.alpha())
+ if (!color.alpha() && cairo_get_operator(cr) == CAIRO_OPERATOR_OVER)
return;
setSourceRGBAFromColor(cr, color);
cairo_rectangle(cr, rect.x(), rect.y(), rect.width(), rect.height());
_______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes