[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
alex at webkit.org
alex at webkit.org
Wed Dec 22 18:02:58 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 20980e97c7106e1d8a03035dd0ee894f81990f0e
Author: alex at webkit.org <alex at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Dec 6 16:00:32 2010 +0000
2010-12-06 Alejandro G. Castro <alex at igalia.com>
Reviewed by Martin Robinson.
[GTK] using shadows leaks memory
https://bugs.webkit.org/show_bug.cgi?id=50541
Fixed leaks in the shadow code.
* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::drawPatternToCairoContext): adoptRef instead of just
getting a new reference.
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::drawPathShadow): handle cairo_path_t with smart
pointers.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 35ba31a..80e18c8 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-12-06 Alejandro G. Castro <alex at igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] using shadows leaks memory
+ https://bugs.webkit.org/show_bug.cgi?id=50541
+
+ Fixed leaks in the shadow code.
+ * platform/graphics/cairo/CairoUtilities.cpp:
+ (WebCore::drawPatternToCairoContext): adoptRef instead of just
+ getting a new reference.
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::drawPathShadow): handle cairo_path_t with smart
+ pointers.
+
2010-12-06 Yury Semikhatsky <yurys at chromium.org>
Reviewed by Pavel Feldman.
diff --git a/WebCore/platform/graphics/cairo/CairoUtilities.cpp b/WebCore/platform/graphics/cairo/CairoUtilities.cpp
index 709ee8f..013a4af 100644
--- a/WebCore/platform/graphics/cairo/CairoUtilities.cpp
+++ b/WebCore/platform/graphics/cairo/CairoUtilities.cpp
@@ -130,7 +130,7 @@ void drawPatternToCairoContext(cairo_t* cr, cairo_surface_t* image, const IntSiz
if (tileRect.size() != imageSize) {
IntRect imageRect = enclosingIntRect(tileRect);
clippedImageSurface = adoptRef(cairo_image_surface_create(CAIRO_FORMAT_ARGB32, imageRect.width(), imageRect.height()));
- RefPtr<cairo_t> clippedImageContext(cairo_create(clippedImageSurface.get()));
+ RefPtr<cairo_t> clippedImageContext = adoptRef(cairo_create(clippedImageSurface.get()));
cairo_set_source_surface(clippedImageContext.get(), image, -tileRect.x(), -tileRect.y());
cairo_paint(clippedImageContext.get());
image = clippedImageSurface.get();
diff --git a/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp b/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
index 6bb7633..e4ff82f 100644
--- a/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
+++ b/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
@@ -144,7 +144,7 @@ static inline void drawPathShadow(GraphicsContext* context, GraphicsContextPriva
// Calculate the extents of the rendered solid paths.
cairo_t* cairoContext = context->platformContext();
- cairo_path_t* path = cairo_copy_path(cairoContext);
+ OwnPtr<cairo_path_t> path(cairo_copy_path(cairoContext));
FloatRect solidFigureExtents;
double x0 = 0;
@@ -168,7 +168,7 @@ static inline void drawPathShadow(GraphicsContext* context, GraphicsContextPriva
// It's important to copy the context properties to the new shadow
// context to preserve things such as the fill rule and stroke width.
copyContextProperties(cairoContext, shadowContext);
- cairo_append_path(shadowContext, path);
+ cairo_append_path(shadowContext, path.get());
if (drawingStyle & Fill)
setPlatformFill(context, shadowContext, contextPrivate);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list