[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
mrowe at apple.com
mrowe at apple.com
Wed Dec 22 11:45:55 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 98723c19e50717f37284040eb9eb21b27a80ed67
Author: mrowe at apple.com <mrowe at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Aug 6 01:38:15 2010 +0000
Fix some leaks seen on the buildbot.
Reviewed by Jon Honeycutt.
* platform/graphics/cg/GraphicsContext3DCG.cpp:
(WebCore::GraphicsContext3D::paintToCanvas): Adopt the newly-created CoreGraphics objects rather than sharing ownership
and over-incrementing their reference count. Also cleaned up the bizarre wrapping used for function arguments while I was
touching this code.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64809 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2dbe18c..a713064 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-08-05 Mark Rowe <mrowe at apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ Fix some leaks seen on the buildbot.
+
+ * platform/graphics/cg/GraphicsContext3DCG.cpp:
+ (WebCore::GraphicsContext3D::paintToCanvas): Adopt the newly-created CoreGraphics objects rather than sharing ownership
+ and over-incrementing their reference count. Also cleaned up the bizarre wrapping used for function arguments while I was
+ touching this code.
+
2010-08-05 James Robinson <jamesr at chromium.org>
Rubber stamped by Eric Seidel.
diff --git a/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp b/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp
index 8af3d0e..df14f9d 100644
--- a/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp
+++ b/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp
@@ -111,34 +111,20 @@ void GraphicsContext3D::paintToCanvas(const unsigned char* imagePixels, int imag
if (!imagePixels || imageWidth <= 0 || imageHeight <= 0 || canvasWidth <= 0 || canvasHeight <= 0 || !context)
return;
int rowBytes = imageWidth * 4;
- RetainPtr<CGDataProviderRef> dataProvider = CGDataProviderCreateWithData(0, imagePixels, rowBytes * imageHeight, 0);
- RetainPtr<CGColorSpaceRef> colorSpace = CGColorSpaceCreateDeviceRGB();
- RetainPtr<CGImageRef> cgImage = CGImageCreate(imageWidth,
- imageHeight,
- 8,
- 32,
- rowBytes,
- colorSpace.get(),
- kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host,
- dataProvider.get(),
- 0,
- false,
- kCGRenderingIntentDefault);
+ RetainPtr<CGDataProviderRef> dataProvider(AdoptCF, CGDataProviderCreateWithData(0, imagePixels, rowBytes * imageHeight, 0));
+ RetainPtr<CGColorSpaceRef> colorSpace(AdoptCF, CGColorSpaceCreateDeviceRGB());
+ RetainPtr<CGImageRef> cgImage(AdoptCF, CGImageCreate(imageWidth, imageHeight, 8, 32, rowBytes, colorSpace.get(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host,
+ dataProvider.get(), 0, false, kCGRenderingIntentDefault));
// CSS styling may cause the canvas's content to be resized on
// the page. Go back to the Canvas to figure out the correct
// width and height to draw.
- CGRect rect = CGRectMake(0, 0,
- canvasWidth,
- canvasHeight);
+ CGRect rect = CGRectMake(0, 0, canvasWidth, canvasHeight);
// We want to completely overwrite the previous frame's
// rendering results.
CGContextSaveGState(context);
- CGContextSetBlendMode(context,
- kCGBlendModeCopy);
- CGContextSetInterpolationQuality(context,
- kCGInterpolationNone);
- CGContextDrawImage(context,
- rect, cgImage.get());
+ CGContextSetBlendMode(context, kCGBlendModeCopy);
+ CGContextSetInterpolationQuality(context, kCGInterpolationNone);
+ CGContextDrawImage(context, rect, cgImage.get());
CGContextRestoreGState(context);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list