[webkit-changes] cvs commit: WebCore/kcanvas/device/quartz
KRenderingDeviceQuartz.mm
Eric
eseidel at opensource.apple.com
Tue Dec 20 01:30:25 PST 2005
eseidel 05/12/20 01:30:25
Modified: . ChangeLog
kcanvas KCanvasFilters.cpp KCanvasFilters.h
kcanvas/device/quartz KRenderingDeviceQuartz.mm
Log:
Bug #: 6156
Submitted by: eseidel
Reviewed by: mjs
Leaks when running SVG tests
http://bugzilla.opendarwin.org/show_bug.cgi?id=6156
No additional tests necessary, leaks already caught by other tests.
* kcanvas/KCanvasFilters.cpp:
(KCanvasFEDiffuseLighting::setLightSource): takes ownership
(KCanvasFESpecularLighting::setLightSource): takes ownership
* kcanvas/KCanvasFilters.h:
(KCanvasFEDiffuseLighting::KCanvasFEDiffuseLighting): added
(KCanvasFEDiffuseLighting::~KCanvasFEDiffuseLighting): added
(KCanvasFEDiffuseLighting::lightSource): fixed spacing
(KCanvasFESpecularLighting::KCanvasFESpecularLighting): added
(KCanvasFESpecularLighting::~KCanvasFESpecularLighting): added
(KCanvasFESpecularLighting::lightSource): fixed spacing
* kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
(KRenderingDeviceQuartz::stringForPath): added missing CFRelease
Revision Changes Path
1.9 +21 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ChangeLog 20 Dec 2005 09:16:43 -0000 1.8
+++ ChangeLog 20 Dec 2005 09:30:23 -0000 1.9
@@ -1,5 +1,26 @@
2005-12-20 Eric Seidel <eseidel at apple.com>
+ Reviewed by mjs.
+
+ Leaks when running SVG tests
+ http://bugzilla.opendarwin.org/show_bug.cgi?id=6156
+ No additional tests necessary, leaks already caught by other tests.
+
+ * kcanvas/KCanvasFilters.cpp:
+ (KCanvasFEDiffuseLighting::setLightSource): takes ownership
+ (KCanvasFESpecularLighting::setLightSource): takes ownership
+ * kcanvas/KCanvasFilters.h:
+ (KCanvasFEDiffuseLighting::KCanvasFEDiffuseLighting): added
+ (KCanvasFEDiffuseLighting::~KCanvasFEDiffuseLighting): added
+ (KCanvasFEDiffuseLighting::lightSource): fixed spacing
+ (KCanvasFESpecularLighting::KCanvasFESpecularLighting): added
+ (KCanvasFESpecularLighting::~KCanvasFESpecularLighting): added
+ (KCanvasFESpecularLighting::lightSource): fixed spacing
+ * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
+ (KRenderingDeviceQuartz::stringForPath): added missing CFRelease
+
+2005-12-20 Eric Seidel <eseidel at apple.com>
+
Reviewed by darin.
Remove additional bit-rotted DEBUG* ifdefs from WebCore.
1.12 +16 -0 WebCore/kcanvas/KCanvasFilters.cpp
Index: KCanvasFilters.cpp
===================================================================
RCS file: /cvs/root/WebCore/kcanvas/KCanvasFilters.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- KCanvasFilters.cpp 12 Dec 2005 17:25:55 -0000 1.11
+++ KCanvasFilters.cpp 20 Dec 2005 09:30:24 -0000 1.12
@@ -287,6 +287,22 @@
return ts;
}
+void KCanvasFEDiffuseLighting::setLightSource(KCLightSource *lightSource)
+{
+ if (m_lightSource != lightSource) {
+ delete m_lightSource;
+ m_lightSource = lightSource;
+ }
+}
+
+void KCanvasFESpecularLighting::setLightSource(KCLightSource *lightSource)
+{
+ if (m_lightSource != lightSource) {
+ delete m_lightSource;
+ m_lightSource = lightSource;
+ }
+}
+
QTextStream &KCanvasFEDiffuseLighting::externalRepresentation(QTextStream &ts) const
{
ts << "[type=DIFFUSE-LIGHTING] ";
1.16 +10 -4 WebCore/kcanvas/KCanvasFilters.h
Index: KCanvasFilters.h
===================================================================
RCS file: /cvs/root/WebCore/kcanvas/KCanvasFilters.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- KCanvasFilters.h 12 Dec 2005 17:25:55 -0000 1.15
+++ KCanvasFilters.h 20 Dec 2005 09:30:24 -0000 1.16
@@ -438,6 +438,9 @@
class KCanvasFEDiffuseLighting : public KCanvasFilterEffect
{
public:
+ KCanvasFEDiffuseLighting() : m_lightSource(0) { }
+ ~KCanvasFEDiffuseLighting() { delete m_lightSource; }
+
QColor lightingColor() const { return m_lightingColor; }
void setLightingColor(const QColor &lightingColor) { m_lightingColor = lightingColor; }
@@ -453,8 +456,8 @@
float kernelUnitLengthY() const { return m_kernelUnitLengthY; }
void setKernelUnitLengthY(float kernelUnitLengthY) { m_kernelUnitLengthY = kernelUnitLengthY; }
- const KCLightSource * lightSource() const { return m_lightSource; }
- void setLightSource(KCLightSource * lightSource) { m_lightSource = lightSource; }
+ const KCLightSource *lightSource() const { return m_lightSource; }
+ void setLightSource(KCLightSource *lightSource);
QTextStream &externalRepresentation(QTextStream &) const;
@@ -595,6 +598,9 @@
class KCanvasFESpecularLighting : public KCanvasFilterEffect
{
public:
+ KCanvasFESpecularLighting() : m_lightSource(0) { }
+ ~KCanvasFESpecularLighting() { delete m_lightSource; }
+
QColor lightingColor() const { return m_lightingColor; }
void setLightingColor(const QColor &lightingColor) { m_lightingColor = lightingColor; }
@@ -613,8 +619,8 @@
float kernelUnitLengthY() const { return m_kernelUnitLengthY; }
void setKernelUnitLengthY(float kernelUnitLengthY) { m_kernelUnitLengthY = kernelUnitLengthY; }
- const KCLightSource * lightSource() const { return m_lightSource; }
- void setLightSource(KCLightSource * lightSource) { m_lightSource = lightSource; }
+ const KCLightSource *lightSource() const { return m_lightSource; }
+ void setLightSource(KCLightSource *lightSource);
QTextStream &externalRepresentation(QTextStream &) const;
1.9 +1 -0 WebCore/kcanvas/device/quartz/KRenderingDeviceQuartz.mm
Index: KRenderingDeviceQuartz.mm
===================================================================
RCS file: /cvs/root/WebCore/kcanvas/device/quartz/KRenderingDeviceQuartz.mm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- KRenderingDeviceQuartz.mm 6 Dec 2005 01:23:22 -0000 1.8
+++ KRenderingDeviceQuartz.mm 20 Dec 2005 09:30:24 -0000 1.9
@@ -173,6 +173,7 @@
CGPathRef cgPath = static_cast<const KCanvasPathQuartz *>(path)->cgPath();
CFStringRef pathString = CFStringFromCGPath(cgPath);
result = QString::fromCFString(pathString);
+ CFRelease(pathString);
}
return result;
}
More information about the webkit-changes
mailing list