[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756
simon.fraser at apple.com
simon.fraser at apple.com
Fri Feb 26 22:24:50 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit d6b17513822ce78289be0de1c2c9c284f9f4a5ee
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Feb 18 17:51:20 2010 +0000
2010-02-18 Simon Fraser <simon.fraser at apple.com>
Reviewed by Darin Adler.
<rdar://problem/7655195> Switch Leopard back to using CGShading to avoid CGGradient leaks
Define USE_CG_SHADING on for Tiger and Leopard, and use it to toggle the methods
used for Core Graphics gradient drawing.
* platform/graphics/Gradient.h:
* platform/graphics/cg/GradientCG.cpp:
(WebCore::Gradient::platformDestroy):
(WebCore::Gradient::paint):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 666399b..c8349ce 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-02-18 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7655195> Switch Leopard back to using CGShading to avoid CGGradient leaks
+
+ Define USE_CG_SHADING on for Tiger and Leopard, and use it to toggle the methods
+ used for Core Graphics gradient drawing.
+
+ * platform/graphics/Gradient.h:
+ * platform/graphics/cg/GradientCG.cpp:
+ (WebCore::Gradient::platformDestroy):
+ (WebCore::Gradient::paint):
+
2010-02-18 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
diff --git a/WebCore/platform/graphics/Gradient.h b/WebCore/platform/graphics/Gradient.h
index 42dd850..8fd8790 100644
--- a/WebCore/platform/graphics/Gradient.h
+++ b/WebCore/platform/graphics/Gradient.h
@@ -37,7 +37,9 @@
#if PLATFORM(CG)
-#ifdef BUILDING_ON_TIGER
+#define USE_CG_SHADING defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
+
+#if USE_CG_SHADING
typedef struct CGShading* CGShadingRef;
typedef CGShadingRef PlatformGradient;
#else
diff --git a/WebCore/platform/graphics/cg/GradientCG.cpp b/WebCore/platform/graphics/cg/GradientCG.cpp
index e9b5de7..9c91700 100644
--- a/WebCore/platform/graphics/cg/GradientCG.cpp
+++ b/WebCore/platform/graphics/cg/GradientCG.cpp
@@ -36,7 +36,7 @@ namespace WebCore {
void Gradient::platformDestroy()
{
-#ifdef BUILDING_ON_TIGER
+#if USE_CG_SHADING
CGShadingRelease(m_gradient);
#else
CGGradientRelease(m_gradient);
@@ -44,7 +44,7 @@ void Gradient::platformDestroy()
m_gradient = 0;
}
-#ifdef BUILDING_ON_TIGER
+#if USE_CG_SHADING
static void gradientCallback(void* info, const CGFloat* in, CGFloat* out)
{
float r, g, b, a;
@@ -114,7 +114,7 @@ void Gradient::fill(GraphicsContext* context, const FloatRect& rect)
void Gradient::paint(GraphicsContext* context)
{
-#ifdef BUILDING_ON_TIGER
+#if USE_CG_SHADING
CGContextDrawShading(context->platformContext(), platformGradient());
#else
CGGradientDrawingOptions extendOptions = kCGGradientDrawsBeforeStartLocation | kCGGradientDrawsAfterEndLocation;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list