Changeset 34912 in webkit
- Timestamp:
- Jul 1, 2008 4:10:45 AM (16 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r34911 r34912 1 2008-07-01 Alex Mathews <possessedpenguinbob@gmail.com> 2 3 Reviewed by Nikolas Zimmermann. 4 5 Class name changes for SVG Light Effect files. The class names that changed : 6 7 SVGLightSource -> LightSource 8 SVGDistantLightSource -> DistantLightSource 9 SVGPointLightSource -> PointLightSource 10 SVGSpotLightSource -> SpotLightSource 11 12 Every other file that is changed is just propagating the class name changes to 13 dependent files. 14 15 * svg/SVGFEDiffuseLightingElement.cpp: 16 (WebCore::SVGFEDiffuseLightingElement::updateLights): 17 * svg/SVGFEDistantLightElement.cpp: 18 (WebCore::SVGFEDistantLightElement::lightSource): 19 * svg/SVGFEDistantLightElement.h: 20 * svg/SVGFELightElement.h: 21 * svg/SVGFEPointLightElement.cpp: 22 (WebCore::SVGFEPointLightElement::lightSource): 23 * svg/SVGFEPointLightElement.h: 24 * svg/SVGFESpecularLightingElement.cpp: 25 (WebCore::SVGFESpecularLightingElement::updateLights): 26 * svg/SVGFESpotLightElement.cpp: 27 (WebCore::SVGFESpotLightElement::lightSource): 28 * svg/SVGFESpotLightElement.h: 29 * svg/graphics/filters/SVGDistantLightSource.h: 30 (WebCore::DistantLightSource::DistantLightSource): 31 (WebCore::DistantLightSource::azimuth): 32 (WebCore::DistantLightSource::elevation): 33 * svg/graphics/filters/SVGFEDiffuseLighting.cpp: 34 (WebCore::SVGFEDiffuseLighting::lightSource): 35 (WebCore::SVGFEDiffuseLighting::setLightSource): 36 * svg/graphics/filters/SVGFEDiffuseLighting.h: 37 * svg/graphics/filters/SVGFESpecularLighting.cpp: 38 (WebCore::SVGFESpecularLighting::lightSource): 39 (WebCore::SVGFESpecularLighting::setLightSource): 40 * svg/graphics/filters/SVGFESpecularLighting.h: 41 * svg/graphics/filters/SVGLightSource.cpp: 42 (WebCore::PointLightSource::externalRepresentation): 43 (WebCore::SpotLightSource::externalRepresentation): 44 (WebCore::DistantLightSource::externalRepresentation): 45 * svg/graphics/filters/SVGLightSource.h: 46 (WebCore::): 47 (WebCore::LightSource::LightSource): 48 (WebCore::LightSource::~LightSource): 49 (WebCore::LightSource::type): 50 * svg/graphics/filters/SVGPointLightSource.h: 51 (WebCore::PointLightSource::PointLightSource): 52 (WebCore::PointLightSource::position): 53 * svg/graphics/filters/SVGSpotLightSource.h: 54 (WebCore::SpotLightSource::SpotLightSource): 55 (WebCore::SpotLightSource::position): 56 (WebCore::SpotLightSource::direction): 57 (WebCore::SpotLightSource::specularExponent): 58 (WebCore::SpotLightSource::limitingConeAngle): 59 * svg/graphics/filters/cg/SVGFEDiffuseLightingCg.mm: 60 (WebCore::SVGFEDiffuseLighting::getCIFilter): 61 * svg/graphics/filters/cg/SVGFEHelpersCg.h: 62 * svg/graphics/filters/cg/SVGFEHelpersCg.mm: 63 (WebCore::getLightVectors): 64 * svg/graphics/filters/cg/SVGFESpecularLightingCg.mm: 65 (WebCore::SVGFESpecularLighting::getCIFilter): 66 1 67 2008-07-01 Alp Toker <alp@nuanti.com> 2 68 -
trunk/WebCore/svg/SVGFEDiffuseLightingElement.cpp
r34656 r34912 105 105 return; 106 106 107 SVGLightSource* light = 0;107 LightSource* light = 0; 108 108 for (Node* n = firstChild(); n; n = n->nextSibling()) { 109 109 if (n->hasTagName(SVGNames::feDistantLightTag) || -
trunk/WebCore/svg/SVGFEDistantLightElement.cpp
r28568 r34912 35 35 } 36 36 37 SVGLightSource* SVGFEDistantLightElement::lightSource() const37 LightSource* SVGFEDistantLightElement::lightSource() const 38 38 { 39 return new SVGDistantLightSource(azimuth(), elevation());39 return new DistantLightSource(azimuth(), elevation()); 40 40 } 41 41 -
trunk/WebCore/svg/SVGFEDistantLightElement.h
r28568 r34912 32 32 virtual ~SVGFEDistantLightElement(); 33 33 34 virtual SVGLightSource* lightSource() const;34 virtual LightSource* lightSource() const; 35 35 }; 36 36 -
trunk/WebCore/svg/SVGFELightElement.h
r31600 r34912 37 37 virtual ~SVGFELightElement(); 38 38 39 virtual SVGLightSource* lightSource() const = 0;39 virtual LightSource* lightSource() const = 0; 40 40 virtual void parseMappedAttribute(MappedAttribute*); 41 41 -
trunk/WebCore/svg/SVGFEPointLightElement.cpp
r28568 r34912 35 35 } 36 36 37 SVGLightSource* SVGFEPointLightElement::lightSource() const37 LightSource* SVGFEPointLightElement::lightSource() const 38 38 { 39 39 FloatPoint3D pos(x(), y(), z()); 40 return new SVGPointLightSource(pos);40 return new PointLightSource(pos); 41 41 } 42 42 -
trunk/WebCore/svg/SVGFEPointLightElement.h
r28568 r34912 32 32 virtual ~SVGFEPointLightElement(); 33 33 34 virtual SVGLightSource* lightSource() const;34 virtual LightSource* lightSource() const; 35 35 }; 36 36 -
trunk/WebCore/svg/SVGFESpecularLightingElement.cpp
r34656 r34912 110 110 return; 111 111 112 SVGLightSource* light = 0;112 LightSource* light = 0; 113 113 for (Node* n = firstChild(); n; n = n->nextSibling()) { 114 114 if (n->hasTagName(SVGNames::feDistantLightTag) || -
trunk/WebCore/svg/SVGFESpotLightElement.cpp
r28568 r34912 35 35 } 36 36 37 SVGLightSource* SVGFESpotLightElement::lightSource() const37 LightSource* SVGFESpotLightElement::lightSource() const 38 38 { 39 39 FloatPoint3D pos(x(), y(), z()); … … 45 45 46 46 direction.normalize(); 47 return new S VGSpotLightSource(pos, direction, specularExponent(), limitingConeAngle());47 return new SpotLightSource(pos, direction, specularExponent(), limitingConeAngle()); 48 48 } 49 49 -
trunk/WebCore/svg/SVGFESpotLightElement.h
r28568 r34912 32 32 virtual ~SVGFESpotLightElement(); 33 33 34 virtual SVGLightSource* lightSource() const;34 virtual LightSource* lightSource() const; 35 35 }; 36 36 -
trunk/WebCore/svg/graphics/filters/SVGDistantLightSource.h
r29663 r34912 1 1 /* 2 Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com> 3 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 4 2004, 2005 Rob Buis <buis@kde.org> 4 5 2005 Eric Seidel <eric@webkit.org> … … 28 29 namespace WebCore { 29 30 30 class SVGDistantLightSource : public SVGLightSource {31 public:32 SVGDistantLightSource(float azimuth, float elevation)33 : SVGLightSource(LS_DISTANT)34 , m_azimuth(azimuth)35 , m_elevation(elevation)36 { }31 class DistantLightSource : public LightSource { 32 public: 33 DistantLightSource(float azimuth, float elevation) 34 : LightSource(LS_DISTANT) 35 , m_azimuth(azimuth) 36 , m_elevation(elevation) 37 { } 37 38 38 float azimuth() const { return m_azimuth; }39 float elevation() const { return m_elevation; }39 float azimuth() const { return m_azimuth; } 40 float elevation() const { return m_elevation; } 40 41 41 virtual TextStream& externalRepresentation(TextStream&) const;42 virtual TextStream& externalRepresentation(TextStream&) const; 42 43 43 private:44 float m_azimuth;45 float m_elevation;46 };44 private: 45 float m_azimuth; 46 float m_elevation; 47 }; 47 48 48 49 } // namespace WebCore -
trunk/WebCore/svg/graphics/filters/SVGFEDiffuseLighting.cpp
r34656 r34912 99 99 } 100 100 101 const SVGLightSource* SVGFEDiffuseLighting::lightSource() const101 const LightSource* SVGFEDiffuseLighting::lightSource() const 102 102 { 103 103 return m_lightSource.get(); 104 104 } 105 105 106 void SVGFEDiffuseLighting::setLightSource( SVGLightSource* lightSource)106 void SVGFEDiffuseLighting::setLightSource(LightSource* lightSource) 107 107 { 108 108 m_lightSource = lightSource; -
trunk/WebCore/svg/graphics/filters/SVGFEDiffuseLighting.h
r34656 r34912 29 29 namespace WebCore { 30 30 31 class SVGLightSource;31 class LightSource; 32 32 33 33 class SVGFEDiffuseLighting : public SVGFilterEffect { … … 51 51 void setKernelUnitLengthY(float); 52 52 53 const SVGLightSource* lightSource() const;54 void setLightSource( SVGLightSource*);53 const LightSource* lightSource() const; 54 void setLightSource(LightSource*); 55 55 56 56 virtual TextStream& externalRepresentation(TextStream&) const; … … 68 68 float m_kernelUnitLengthX; 69 69 float m_kernelUnitLengthY; 70 RefPtr< SVGLightSource> m_lightSource;70 RefPtr<LightSource> m_lightSource; 71 71 }; 72 72 -
trunk/WebCore/svg/graphics/filters/SVGFESpecularLighting.cpp
r34656 r34912 109 109 } 110 110 111 const SVGLightSource* SVGFESpecularLighting::lightSource() const111 const LightSource* SVGFESpecularLighting::lightSource() const 112 112 { 113 113 return m_lightSource.get(); 114 114 } 115 115 116 void SVGFESpecularLighting::setLightSource( SVGLightSource* lightSource)116 void SVGFESpecularLighting::setLightSource(LightSource* lightSource) 117 117 { 118 118 m_lightSource = lightSource; -
trunk/WebCore/svg/graphics/filters/SVGFESpecularLighting.h
r34656 r34912 53 53 void setKernelUnitLengthY(float); 54 54 55 const SVGLightSource* lightSource() const;56 void setLightSource( SVGLightSource*);55 const LightSource* lightSource() const; 56 void setLightSource(LightSource*); 57 57 58 58 virtual TextStream& externalRepresentation(TextStream&) const; … … 71 71 float m_kernelUnitLengthX; 72 72 float m_kernelUnitLengthY; 73 RefPtr< SVGLightSource> m_lightSource;73 RefPtr<LightSource> m_lightSource; 74 74 }; 75 75 -
trunk/WebCore/svg/graphics/filters/SVGLightSource.cpp
r29663 r34912 36 36 } 37 37 38 TextStream& SVGPointLightSource::externalRepresentation(TextStream& ts) const38 TextStream& PointLightSource::externalRepresentation(TextStream& ts) const 39 39 { 40 40 ts << "[type=POINT-LIGHT] "; … … 43 43 } 44 44 45 TextStream& S VGSpotLightSource::externalRepresentation(TextStream& ts) const45 TextStream& SpotLightSource::externalRepresentation(TextStream& ts) const 46 46 { 47 47 ts << "[type=SPOT-LIGHT] "; … … 53 53 } 54 54 55 TextStream& SVGDistantLightSource::externalRepresentation(TextStream& ts) const55 TextStream& DistantLightSource::externalRepresentation(TextStream& ts) const 56 56 { 57 57 ts << "[type=DISTANT-LIGHT] "; -
trunk/WebCore/svg/graphics/filters/SVGLightSource.h
r34656 r34912 1 1 /* 2 Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com> 3 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 4 2004, 2005 Rob Buis <buis@kde.org> 4 5 2005 Eric Seidel <eric@webkit.org> … … 28 29 namespace WebCore { 29 30 30 enum SVGLightType {31 LS_DISTANT,32 LS_POINT,33 LS_SPOT34 };31 enum LightType { 32 LS_DISTANT, 33 LS_POINT, 34 LS_SPOT 35 }; 35 36 36 class TextStream;37 class TextStream; 37 38 38 class SVGLightSource : public RefCounted<SVGLightSource> {39 public:40 SVGLightSource(SVGLightType type)41 : m_type(type)42 { }39 class LightSource : public RefCounted<LightSource> { 40 public: 41 LightSource(LightType type) 42 : m_type(type) 43 { } 43 44 44 virtual ~SVGLightSource() { }45 virtual ~LightSource() { } 45 46 46 SVGLightType type() const { return m_type; }47 virtual TextStream& externalRepresentation(TextStream&) const = 0;47 LightType type() const { return m_type; } 48 virtual TextStream& externalRepresentation(TextStream&) const = 0; 48 49 49 private: 50 SVGLightType m_type; 51 }; 52 50 private: 51 LightType m_type; 52 }; 53 53 54 54 } // namespace WebCore -
trunk/WebCore/svg/graphics/filters/SVGPointLightSource.h
r29663 r34912 1 1 /* 2 Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com> 3 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 4 2004, 2005 Rob Buis <buis@kde.org> 4 5 2005 Eric Seidel <eric@webkit.org> … … 29 30 namespace WebCore { 30 31 31 class SVGPointLightSource : public SVGLightSource {32 public:33 SVGPointLightSource(const FloatPoint3D& position)34 : SVGLightSource(LS_POINT)35 , m_position(position)36 { }32 class PointLightSource : public LightSource { 33 public: 34 PointLightSource(const FloatPoint3D& position) 35 : LightSource(LS_POINT) 36 , m_position(position) 37 { } 37 38 38 const FloatPoint3D& position() const { return m_position; }39 const FloatPoint3D& position() const { return m_position; } 39 40 40 virtual TextStream& externalRepresentation(TextStream&) const;41 virtual TextStream& externalRepresentation(TextStream&) const; 41 42 42 private:43 FloatPoint3D m_position;44 };43 private: 44 FloatPoint3D m_position; 45 }; 45 46 46 47 } // namespace WebCore -
trunk/WebCore/svg/graphics/filters/SVGSpotLightSource.h
r29663 r34912 1 1 /* 2 Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com> 3 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 4 2004, 2005 Rob Buis <buis@kde.org> 4 5 2005 Eric Seidel <eric@webkit.org> … … 29 30 namespace WebCore { 30 31 31 class SVGSpotLightSource : public SVGLightSource {32 public:33 SVGSpotLightSource(const FloatPoint3D& position, const FloatPoint3D& direction, float specularExponent, float limitingConeAngle)34 : SVGLightSource(LS_SPOT)35 , m_position(position)36 , m_direction(direction)37 , m_specularExponent(specularExponent)38 , m_limitingConeAngle(limitingConeAngle)39 { }32 class SpotLightSource : public LightSource { 33 public: 34 SpotLightSource(const FloatPoint3D& position, const FloatPoint3D& direction, float specularExponent, float limitingConeAngle) 35 : LightSource(LS_SPOT) 36 , m_position(position) 37 , m_direction(direction) 38 , m_specularExponent(specularExponent) 39 , m_limitingConeAngle(limitingConeAngle) 40 { } 40 41 41 const FloatPoint3D& position() const { return m_position; }42 const FloatPoint3D& direction() const { return m_direction; }42 const FloatPoint3D& position() const { return m_position; } 43 const FloatPoint3D& direction() const { return m_direction; } 43 44 44 float specularExponent() const { return m_specularExponent; }45 float limitingConeAngle() const { return m_limitingConeAngle; }45 float specularExponent() const { return m_specularExponent; } 46 float limitingConeAngle() const { return m_limitingConeAngle; } 46 47 47 virtual TextStream& externalRepresentation(TextStream&) const;48 virtual TextStream& externalRepresentation(TextStream&) const; 48 49 49 private:50 FloatPoint3D m_position;51 FloatPoint3D m_direction;50 private: 51 FloatPoint3D m_position; 52 FloatPoint3D m_direction; 52 53 53 float m_specularExponent;54 float m_limitingConeAngle;55 };54 float m_specularExponent; 55 float m_limitingConeAngle; 56 }; 56 57 57 58 } // namespace WebCore -
trunk/WebCore/svg/graphics/filters/cg/SVGFEDiffuseLightingCg.mm
r29663 r34912 32 32 CIFilter* SVGFEDiffuseLighting::getCIFilter(const FloatRect& bbox) const 33 33 { 34 const SVGLightSource* light = lightSource();34 const LightSource* light = lightSource(); 35 35 if (!light) 36 36 return nil; -
trunk/WebCore/svg/graphics/filters/cg/SVGFEHelpersCg.h
r29663 r34912 30 30 31 31 class Color; 32 class SVGLightSource;32 class LightSource; 33 33 34 34 namespace WebCore { … … 39 39 // Lighting 40 40 CIFilter* getPointLightVectors(CIFilter* normals, CIVector* lightPosition, float surfaceScale); 41 CIFilter* getLightVectors(CIFilter* normals, const SVGLightSource* light, float surfaceScale);41 CIFilter* getLightVectors(CIFilter* normals, const LightSource* light, float surfaceScale); 42 42 CIFilter* getNormalMap(CIImage* bumpMap, float scale); 43 43 -
trunk/WebCore/svg/graphics/filters/cg/SVGFEHelpersCg.mm
r29663 r34912 83 83 } 84 84 85 CIFilter* getLightVectors(CIFilter* normals, const SVGLightSource* light, float surfaceScale)85 CIFilter* getLightVectors(CIFilter* normals, const LightSource* light, float surfaceScale) 86 86 { 87 87 [WKDistantLightFilter class]; … … 95 95 case LS_DISTANT: 96 96 { 97 const SVGDistantLightSource* dlight = static_cast<const SVGDistantLightSource*>(light);97 const DistantLightSource* dlight = static_cast<const DistantLightSource*>(light); 98 98 99 99 filter = [CIFilter filterWithName:@"WKDistantLight"]; … … 116 116 case LS_POINT: 117 117 { 118 const SVGPointLightSource* plight = static_cast<const SVGPointLightSource*>(light);118 const PointLightSource* plight = static_cast<const PointLightSource*>(light); 119 119 return getPointLightVectors(normals, [CIVector vectorWithX:plight->position().x() Y:plight->position().y() Z:plight->position().z()], surfaceScale); 120 120 } 121 121 case LS_SPOT: 122 122 { 123 const S VGSpotLightSource* slight = static_cast<const SVGSpotLightSource*>(light);123 const SpotLightSource* slight = static_cast<const SpotLightSource*>(light); 124 124 filter = [CIFilter filterWithName:@"WKSpotLight"]; 125 125 if (!filter) -
trunk/WebCore/svg/graphics/filters/cg/SVGFESpecularLightingCg.mm
r29663 r34912 32 32 CIFilter* SVGFESpecularLighting::getCIFilter(const FloatRect& bbox) const 33 33 { 34 const SVGLightSource* light = lightSource();34 const LightSource* light = lightSource(); 35 35 if (!light) 36 36 return nil;
Note: See TracChangeset
for help on using the changeset viewer.