[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
thakis at chromium.org
thakis at chromium.org
Wed Dec 22 13:12:06 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 04e756accf9c0666ef85d11e24b5e1ab1d7d7a95
Author: thakis at chromium.org <thakis at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Sep 8 21:25:00 2010 +0000
2010-09-08 Nico Weber <thakis at chromium.org>
Reviewed by Dimitri Glazkov.
chromium/mac: Fix overrelease in ImageLayerChromium
https://bugs.webkit.org/show_bug.cgi?id=45360
Only release colorSpace if we created it.
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerChromium::updateContents):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67015 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b496766..9966076 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-09-08 Nico Weber <thakis at chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ chromium/mac: Fix overrelease in ImageLayerChromium
+ https://bugs.webkit.org/show_bug.cgi?id=45360
+
+ Only release colorSpace if we created it.
+
+ * platform/graphics/chromium/ImageLayerChromium.cpp:
+ (WebCore::ImageLayerChromium::updateContents):
+
2010-09-08 Robert Hogan <robert at webkit.org>
Reviewed by Antonio Gomes.
diff --git a/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp b/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
index 09b388d..060bb46 100644
--- a/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
+++ b/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
@@ -108,8 +108,9 @@ void ImageLayerChromium::updateContents()
// completely overwrite its contents with the image below.
// Try to reuse the color space from the image to preserve its colors.
// Some images use a color space (such as indexed) unsupported by the bitmap context.
- RetainPtr<CGColorSpaceRef> colorSpace(AdoptCF, CGImageGetColorSpace(cgImage));
- CGColorSpaceModel colorSpaceModel = CGColorSpaceGetModel(colorSpace.get());
+ RetainPtr<CGColorSpaceRef> colorSpaceReleaser;
+ CGColorSpaceRef colorSpace = CGImageGetColorSpace(cgImage);
+ CGColorSpaceModel colorSpaceModel = CGColorSpaceGetModel(colorSpace);
switch (colorSpaceModel) {
case kCGColorSpaceModelMonochrome:
case kCGColorSpaceModelRGB:
@@ -118,12 +119,13 @@ void ImageLayerChromium::updateContents()
case kCGColorSpaceModelDeviceN:
break;
default:
- colorSpace.adoptCF(CGColorSpaceCreateDeviceRGB());
+ colorSpaceReleaser.adoptCF(CGColorSpaceCreateDeviceRGB());
+ colorSpace = colorSpaceReleaser.get();
break;
}
RetainPtr<CGContextRef> tempContext(AdoptCF, CGBitmapContextCreate(tempVector.data(),
width, height, 8, tempRowBytes,
- colorSpace.get(),
+ colorSpace,
kCGImageAlphaPremultipliedLast));
CGContextSetBlendMode(tempContext.get(), kCGBlendModeCopy);
CGContextDrawImage(tempContext.get(),
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list