[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
eric at webkit.org
eric at webkit.org
Thu Dec 3 13:27:08 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit bad66dfb47b6bfc483ee6638a77567a29657bdab
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Nov 4 21:00:11 2009 +0000
2009-11-04 Benjamin Otte <otte at gnome.org>
Reviewed by Gustavo Noronha.
Update Cairo requirement to 1.6.
https://bugs.webkit.org/show_bug.cgi?id=19266
* configure.ac:
2009-11-04 Benjamin Otte <otte at gnome.org>
Reviewed by Gustavo Noronha.
Update Cairo requirement to 1.6.
Also remove all conditional code and workarounds for older versions of
Cairo.
In particular, gain image quality by removing the use of
CAIRO_FILTER_NEAREST when rendering images and use the default
bilinear filter instead.
https://bugs.webkit.org/show_bug.cgi?id=19266
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::clipOut):
* platform/graphics/cairo/ImageCairo.cpp:
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::drawPattern):
* platform/graphics/cairo/PathCairo.cpp:
(WebCore::Path::isEmpty):
(WebCore::Path::boundingRect):
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::paintMozWidget):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/ChangeLog b/ChangeLog
index c5231a7..16eb433 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-11-04 Benjamin Otte <otte at gnome.org>
+
+ Reviewed by Gustavo Noronha.
+
+ Update Cairo requirement to 1.6.
+
+ https://bugs.webkit.org/show_bug.cgi?id=19266
+
+ * configure.ac:
+
2009-11-02 Estêvão Samuel Procópio <tevaum at gmail.com>
Reviewed by Gustavo Noronha.
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 71f46ba..37d9ab1 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,27 @@
+2009-11-04 Benjamin Otte <otte at gnome.org>
+
+ Reviewed by Gustavo Noronha.
+
+ Update Cairo requirement to 1.6.
+
+ Also remove all conditional code and workarounds for older versions of
+ Cairo.
+ In particular, gain image quality by removing the use of
+ CAIRO_FILTER_NEAREST when rendering images and use the default
+ bilinear filter instead.
+ https://bugs.webkit.org/show_bug.cgi?id=19266
+
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::GraphicsContext::clipOut):
+ * platform/graphics/cairo/ImageCairo.cpp:
+ (WebCore::BitmapImage::draw):
+ (WebCore::BitmapImage::drawPattern):
+ * platform/graphics/cairo/PathCairo.cpp:
+ (WebCore::Path::isEmpty):
+ (WebCore::Path::boundingRect):
+ * platform/gtk/RenderThemeGtk.cpp:
+ (WebCore::paintMozWidget):
+
2009-11-04 Kevin Ollivier <kevino at theolliviers.com>
wx build fix. Restore removed string conversion after cleanup.
diff --git a/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp b/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
index 8741c5e..9b09e16 100644
--- a/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
+++ b/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
@@ -941,7 +941,6 @@ void GraphicsContext::clipOut(const Path& path)
if (paintingDisabled())
return;
-#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,4,0)
cairo_t* cr = m_data->cr;
double x1, y1, x2, y2;
cairo_clip_extents(cr, &x1, &y1, &x2, &y2);
@@ -952,9 +951,6 @@ void GraphicsContext::clipOut(const Path& path)
cairo_set_fill_rule(cr, CAIRO_FILL_RULE_EVEN_ODD);
cairo_clip(cr);
cairo_set_fill_rule(cr, savedFillRule);
-#else
- notImplemented();
-#endif
}
void GraphicsContext::rotate(float radians)
@@ -980,7 +976,6 @@ void GraphicsContext::clipOut(const IntRect& r)
if (paintingDisabled())
return;
-#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,4,0)
cairo_t* cr = m_data->cr;
double x1, y1, x2, y2;
cairo_clip_extents(cr, &x1, &y1, &x2, &y2);
@@ -990,9 +985,6 @@ void GraphicsContext::clipOut(const IntRect& r)
cairo_set_fill_rule(cr, CAIRO_FILL_RULE_EVEN_ODD);
cairo_clip(cr);
cairo_set_fill_rule(cr, savedFillRule);
-#else
- notImplemented();
-#endif
}
void GraphicsContext::clipOutEllipseInRect(const IntRect& r)
diff --git a/WebCore/platform/graphics/cairo/ImageCairo.cpp b/WebCore/platform/graphics/cairo/ImageCairo.cpp
index c8c992e..7d187c7 100644
--- a/WebCore/platform/graphics/cairo/ImageCairo.cpp
+++ b/WebCore/platform/graphics/cairo/ImageCairo.cpp
@@ -125,11 +125,7 @@ void BitmapImage::draw(GraphicsContext* context, const FloatRect& dst, const Flo
// Test using example site at http://www.meyerweb.com/eric/css/edge/complexspiral/demo.html
cairo_pattern_t* pattern = cairo_pattern_create_for_surface(image);
- // To avoid the unwanted gradient effect (#14017) we use
- // CAIRO_FILTER_NEAREST now, but the real fix will be to have
- // CAIRO_EXTEND_PAD implemented for surfaces in Cairo allowing us to still
- // use bilinear filtering
- cairo_pattern_set_filter(pattern, CAIRO_FILTER_NEAREST);
+ cairo_pattern_set_extend(pattern, CAIRO_EXTEND_PAD);
float scaleX = srcRect.width() / dstRect.width();
float scaleY = srcRect.height() / dstRect.height();
@@ -180,9 +176,6 @@ void Image::drawPattern(GraphicsContext* context, const FloatRect& tileRect, con
cairo_pattern_t* pattern = cairo_pattern_create_for_surface(image);
cairo_pattern_set_extend(pattern, CAIRO_EXTEND_REPEAT);
- // Workaround to avoid the unwanted gradient effect (#14017)
- cairo_pattern_set_filter(pattern, CAIRO_FILTER_NEAREST);
-
cairo_matrix_t pattern_matrix = cairo_matrix_t(patternTransform);
cairo_matrix_t phase_matrix = {1, 0, 0, 1, phase.x() + tileRect.x() * patternTransform.a(), phase.y() + tileRect.y() * patternTransform.d()};
cairo_matrix_t combined;
diff --git a/WebCore/platform/graphics/cairo/PathCairo.cpp b/WebCore/platform/graphics/cairo/PathCairo.cpp
index 75681bd..8bde57e 100644
--- a/WebCore/platform/graphics/cairo/PathCairo.cpp
+++ b/WebCore/platform/graphics/cairo/PathCairo.cpp
@@ -78,15 +78,7 @@ void Path::clear()
bool Path::isEmpty() const
{
- cairo_t* cr = platformPath()->m_cr;
-#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,5,10)
- return !cairo_has_current_point(cr);
-#else
- cairo_path_t* p = cairo_copy_path(cr);
- bool hasData = p->num_data;
- cairo_path_destroy(p);
- return !hasData;
-#endif
+ return !cairo_has_current_point(platformPath()->m_cr);
}
bool Path::hasCurrentPoint() const
@@ -256,11 +248,7 @@ FloatRect Path::boundingRect() const
{
cairo_t* cr = platformPath()->m_cr;
double x0, x1, y0, y1;
-#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 6, 0)
cairo_path_extents(cr, &x0, &y0, &x1, &y1);
-#else
- cairo_stroke_extents(cr, &x0, &y0, &x1, &y1);
-#endif
return FloatRect(x0, y0, x1 - x0, y1 - y0);
}
diff --git a/WebCore/platform/gtk/RenderThemeGtk.cpp b/WebCore/platform/gtk/RenderThemeGtk.cpp
index fdef9c2..4842d68 100644
--- a/WebCore/platform/gtk/RenderThemeGtk.cpp
+++ b/WebCore/platform/gtk/RenderThemeGtk.cpp
@@ -188,7 +188,6 @@ static bool paintMozWidget(RenderTheme* theme, GtkThemeWidgetType type, RenderOb
GdkRectangle gdkRect = IntRect(pos.x(), pos.y(), rect.width(), rect.height());
GtkTextDirection direction = gtkTextDirection(o->style()->direction());
-#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,4,0)
// Find the clip rectangle
cairo_t *cr = i.context->platformContext();
double clipX1, clipX2, clipY1, clipY2;
@@ -202,9 +201,6 @@ static bool paintMozWidget(RenderTheme* theme, GtkThemeWidgetType type, RenderOb
gdkClipRect.y = clipPos.y();
gdk_rectangle_intersect(&gdkRect, &gdkClipRect, &gdkClipRect);
-#else
- GdkRectangle gdkClipRect = gdkRect;
-#endif
return moz_gtk_widget_paint(type, i.context->gdkDrawable(), &gdkRect, &gdkClipRect, &mozState, flags, direction) != MOZ_GTK_SUCCESS;
}
diff --git a/configure.ac b/configure.ac
index 5b80fa9..6113a93 100644
--- a/configure.ac
+++ b/configure.ac
@@ -191,7 +191,7 @@ fi
# minimum base dependencies
LIBSOUP_REQUIRED_VERSION=2.27.91
-CAIRO_REQUIRED_VERSION=1.2
+CAIRO_REQUIRED_VERSION=1.6
FONTCONFIG_REQUIRED_VERSION=2.4
FREETYPE2_REQUIRED_VERSION=9.0
LIBXML_REQUIRED_VERSION=2.6
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list