GeneratorGeneratedImage should be called GradientImage
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Sep 2013 10:52:25 +0000 (10:52 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Sep 2013 10:52:25 +0000 (10:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=121085

Reviewed by Simon Fraser.

No new tests, just a refactor.

r150053 removed the concept of a Generator, making GeneratorGeneratedImage
take a Gradient. This leaves GeneratorGeneratedImage's name not making a
whole lot of sense, so let's rename it to GradientImage.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::image):
* platform/graphics/BitmapImage.h:
* platform/graphics/GradientImage.cpp: Renamed from Source/WebCore/platform/graphics/GeneratorGeneratedImage.cpp.
(WebCore::GradientImage::draw):
(WebCore::GradientImage::drawPattern):
* platform/graphics/GradientImage.h: Renamed from Source/WebCore/platform/graphics/GeneratorGeneratedImage.h.
* platform/graphics/Image.h:
* platform/graphics/ImageBuffer.h:
Rename.

* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::cachedImageForSize):
(WebCore::CSSImageGeneratorValue::saveCachedImageForSize):
(WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage):
* css/CSSImageGeneratorValue.h:
(WebCore::CSSImageGeneratorValue::CachedGeneratedImage::image):
Drive-by, the CSSImageGeneratorValue generated image cache should be
in terms of GeneratedImage, not a random subclass, regardless
of the fact that it's only used for GradientImage as of yet.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156226 268f45cc-cd09-0410-ab3c-d52691b4dbfc

15 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/css/CSSGradientValue.cpp
Source/WebCore/css/CSSImageGeneratorValue.cpp
Source/WebCore/css/CSSImageGeneratorValue.h
Source/WebCore/platform/graphics/BitmapImage.h
Source/WebCore/platform/graphics/GradientImage.cpp [moved from Source/WebCore/platform/graphics/GeneratorGeneratedImage.cpp with 91% similarity]
Source/WebCore/platform/graphics/GradientImage.h [moved from Source/WebCore/platform/graphics/GeneratorGeneratedImage.h with 83% similarity]
Source/WebCore/platform/graphics/Image.h
Source/WebCore/platform/graphics/ImageBuffer.h

index b21d3e0..642990e 100644 (file)
@@ -1903,9 +1903,9 @@ set(WebCore_SOURCES
     platform/graphics/LayoutBoxExtent.cpp
     platform/graphics/LayoutRect.cpp
     platform/graphics/GeneratedImage.cpp
-    platform/graphics/GeneratorGeneratedImage.cpp
     platform/graphics/GlyphPageTreeNode.cpp
     platform/graphics/Gradient.cpp
+    platform/graphics/GradientImage.cpp
     platform/graphics/GraphicsContext.cpp
     platform/graphics/GraphicsLayer.cpp
     platform/graphics/GraphicsLayerAnimation.cpp
index b38fd67..aad4ee8 100644 (file)
@@ -1,3 +1,43 @@
+2013-09-21  Tim Horton  <timothy_horton@apple.com>
+
+        GeneratorGeneratedImage should be called GradientImage
+        https://bugs.webkit.org/show_bug.cgi?id=121085
+
+        Reviewed by Simon Fraser.
+
+        No new tests, just a refactor.
+
+        r150053 removed the concept of a Generator, making GeneratorGeneratedImage
+        take a Gradient. This leaves GeneratorGeneratedImage's name not making a
+        whole lot of sense, so let's rename it to GradientImage.
+
+        * CMakeLists.txt:
+        * GNUmakefile.list.am:
+        * Target.pri:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSGradientValue.cpp:
+        (WebCore::CSSGradientValue::image):
+        * platform/graphics/BitmapImage.h:
+        * platform/graphics/GradientImage.cpp: Renamed from Source/WebCore/platform/graphics/GeneratorGeneratedImage.cpp.
+        (WebCore::GradientImage::draw):
+        (WebCore::GradientImage::drawPattern):
+        * platform/graphics/GradientImage.h: Renamed from Source/WebCore/platform/graphics/GeneratorGeneratedImage.h.
+        * platform/graphics/Image.h:
+        * platform/graphics/ImageBuffer.h:
+        Rename.
+
+        * css/CSSImageGeneratorValue.cpp:
+        (WebCore::CSSImageGeneratorValue::cachedImageForSize):
+        (WebCore::CSSImageGeneratorValue::saveCachedImageForSize):
+        (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage):
+        * css/CSSImageGeneratorValue.h:
+        (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::image):
+        Drive-by, the CSSImageGeneratorValue generated image cache should be
+        in terms of GeneratedImage, not a random subclass, regardless
+        of the fact that it's only used for GradientImage as of yet.
+
 2013-09-21  Darin Adler  <darin@apple.com>
 
         Shrink valueForBasicShape by removing repeated calls to cssValuePool()
index c2f9fef..a372b0d 100644 (file)
@@ -5835,8 +5835,6 @@ platform_sources += \
        Source/WebCore/platform/graphics/FontWidthVariant.h \
        Source/WebCore/platform/graphics/GeneratedImage.cpp \
        Source/WebCore/platform/graphics/GeneratedImage.h \
-       Source/WebCore/platform/graphics/GeneratorGeneratedImage.cpp \
-       Source/WebCore/platform/graphics/GeneratorGeneratedImage.h \
        Source/WebCore/platform/graphics/Glyph.h \
        Source/WebCore/platform/graphics/GlyphBuffer.h \
        Source/WebCore/platform/graphics/GlyphMetricsMap.h \
@@ -5845,6 +5843,8 @@ platform_sources += \
        Source/WebCore/platform/graphics/GlyphPageTreeNode.h \
        Source/WebCore/platform/graphics/Gradient.cpp \
        Source/WebCore/platform/graphics/Gradient.h \
+       Source/WebCore/platform/graphics/GradientImage.cpp \
+       Source/WebCore/platform/graphics/GradientImage.h \
        Source/WebCore/platform/graphics/GraphicsContext.cpp \
        Source/WebCore/platform/graphics/GraphicsContext.h \
        Source/WebCore/platform/graphics/GraphicsTypes.cpp \
index ed5b24b..63a1d9f 100644 (file)
@@ -993,9 +993,9 @@ SOURCES += \
     platform/graphics/LayoutBoxExtent.cpp \
     platform/graphics/LayoutRect.cpp \
     platform/graphics/GeneratedImage.cpp \
-    platform/graphics/GeneratorGeneratedImage.cpp \
     platform/graphics/GlyphPageTreeNode.cpp \
     platform/graphics/Gradient.cpp \
+    platform/graphics/GradientImage.cpp \
     platform/graphics/GraphicsContext.cpp \
     platform/graphics/GraphicsLayer.cpp \
     platform/graphics/GraphicsLayerAnimation.cpp \
@@ -2194,10 +2194,10 @@ HEADERS += \
     platform/graphics/FontFeatureSettings.h \
     platform/graphics/FontMetrics.h \
     platform/graphics/Font.h \
-    platform/graphics/GeneratorGeneratedImage.h \
     platform/graphics/GeneratedImage.h \
     platform/graphics/GlyphPageTreeNode.h \
     platform/graphics/Gradient.h \
+    platform/graphics/GradientImage.h \
     platform/graphics/GraphicsContext.h \
     platform/graphics/GraphicsLayer.h \
     platform/graphics/GraphicsLayerAnimation.h \
index 181e4a1..e1cad23 100644 (file)
     <ClCompile Include="..\platform\graphics\FontFeatureSettings.cpp" />
     <ClCompile Include="..\platform\graphics\FontPlatformData.cpp" />
     <ClCompile Include="..\platform\graphics\GeneratedImage.cpp" />
-    <ClCompile Include="..\platform\graphics\GeneratorGeneratedImage.cpp" />
     <ClCompile Include="..\platform\graphics\GlyphPageTreeNode.cpp" />
     <ClCompile Include="..\platform\graphics\Gradient.cpp" />
+    <ClCompile Include="..\platform\graphics\GradientImage.cpp" />
     <ClCompile Include="..\platform\graphics\GraphicsContext.cpp" />
     <ClCompile Include="..\platform\graphics\GraphicsLayer.cpp" />
     <ClCompile Include="..\platform\graphics\GraphicsLayerUpdater.cpp" />
index 5f0d485..8664add 100644 (file)
     <ClCompile Include="..\platform\graphics\FloatQuad.cpp">
       <Filter>platform\graphics</Filter>
     </ClCompile>
-    <ClCompile Include="..\platform\graphics\GeneratorGeneratedImage.cpp">
-      <Filter>platform\graphics</Filter>
-    </ClCompile>
     <ClCompile Include="..\platform\graphics\GlyphPageTreeNode.cpp">
       <Filter>platform\graphics</Filter>
     </ClCompile>
     <ClCompile Include="..\platform\graphics\Gradient.cpp">
       <Filter>platform\graphics</Filter>
     </ClCompile>
+    <ClCompile Include="..\platform\graphics\GradientImage.cpp">
+      <Filter>platform\graphics</Filter>
+    </ClCompile>
     <ClCompile Include="..\platform\graphics\GraphicsContext.cpp">
       <Filter>platform\graphics</Filter>
     </ClCompile>
index 12fc048..a4bc480 100644 (file)
                2D46F05017B96FD2005647F0 /* IntSize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D46F04F17B96FD2005647F0 /* IntSize.cpp */; };
                2D481F00146B5C4C00AA7834 /* CrossfadeGeneratedImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D2FC0541460CD6F00263633 /* CrossfadeGeneratedImage.cpp */; };
                2D481F02146B5C5500AA7834 /* CrossfadeGeneratedImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D2FC0551460CD6F00263633 /* CrossfadeGeneratedImage.h */; };
-               2D481F03146B5C6500AA7834 /* GeneratorGeneratedImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D2FC0561460CD6F00263633 /* GeneratorGeneratedImage.cpp */; };
-               2D481F04146B5C6B00AA7834 /* GeneratorGeneratedImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D2FC0571460CD6F00263633 /* GeneratorGeneratedImage.h */; };
+               2D481F03146B5C6500AA7834 /* GradientImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D2FC0561460CD6F00263633 /* GradientImage.cpp */; };
+               2D481F04146B5C6B00AA7834 /* GradientImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D2FC0571460CD6F00263633 /* GradientImage.h */; };
                2D5A592F152525230036EE51 /* ImageOrientation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8748D7412CC3F89001FBA41 /* ImageOrientation.cpp */; };
                2D5A5931152525D00036EE51 /* ImageOrientation.h in Headers */ = {isa = PBXBuildFile; fileRef = A8748D6612CC3763001FBA41 /* ImageOrientation.h */; settings = {ATTRIBUTES = (Private, ); }; };
                2D5BC42716F882EE007048D0 /* SecurityPolicyViolationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D5BC42516F882BE007048D0 /* SecurityPolicyViolationEvent.h */; };
                2BE8E2C812A58A0100FAD550 /* HTMLMetaCharsetParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLMetaCharsetParser.cpp; path = parser/HTMLMetaCharsetParser.cpp; sourceTree = "<group>"; };
                2D2FC0541460CD6F00263633 /* CrossfadeGeneratedImage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CrossfadeGeneratedImage.cpp; sourceTree = "<group>"; };
                2D2FC0551460CD6F00263633 /* CrossfadeGeneratedImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CrossfadeGeneratedImage.h; sourceTree = "<group>"; };
-               2D2FC0561460CD6F00263633 /* GeneratorGeneratedImage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeneratorGeneratedImage.cpp; sourceTree = "<group>"; };
-               2D2FC0571460CD6F00263633 /* GeneratorGeneratedImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeneratorGeneratedImage.h; sourceTree = "<group>"; };
+               2D2FC0561460CD6F00263633 /* GradientImage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GradientImage.cpp; sourceTree = "<group>"; };
+               2D2FC0571460CD6F00263633 /* GradientImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GradientImage.h; sourceTree = "<group>"; };
                2D3A0E3513A7D76100E85AF0 /* SVGParsingError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGParsingError.h; sourceTree = "<group>"; };
                2D46F04D17B96FBD005647F0 /* IntPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IntPoint.cpp; sourceTree = "<group>"; };
                2D46F04F17B96FD2005647F0 /* IntSize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IntSize.cpp; sourceTree = "<group>"; };
                                BCE4413512F7490B009B84B8 /* FontWidthVariant.h */,
                                4FB390AC15EF61F3007AD51F /* GeneratedImage.cpp */,
                                BC23F0DA0DAFF4A4009FDC91 /* GeneratedImage.h */,
-                               2D2FC0561460CD6F00263633 /* GeneratorGeneratedImage.cpp */,
-                               2D2FC0571460CD6F00263633 /* GeneratorGeneratedImage.h */,
+                               2D2FC0561460CD6F00263633 /* GradientImage.cpp */,
+                               2D2FC0571460CD6F00263633 /* GradientImage.h */,
                                086BBD0E136039C2008B15D8 /* Glyph.h */,
                                B2C3DA5B0D006CD600EF6F26 /* GlyphBuffer.h */,
                                C5D4AA78116BAFB60069CA93 /* GlyphMetricsMap.h */,
                                1432E8470C51493800B1500F /* GCController.h in Headers */,
                                C0C054CC1118C8E400CE2636 /* generate-bindings.pl in Headers */,
                                BC23F0DB0DAFF4A4009FDC91 /* GeneratedImage.h in Headers */,
-                               2D481F04146B5C6B00AA7834 /* GeneratorGeneratedImage.h in Headers */,
+                               2D481F04146B5C6B00AA7834 /* GradientImage.h in Headers */,
                                0720B0A114D3323500642955 /* GenericEventQueue.h in Headers */,
                                9746AF2414F4DDE6003E7A70 /* Geolocation.h in Headers */,
                                9746AF2514F4DDE6003E7A71 /* GeolocationClient.h in Headers */,
                                FD31600C12B0267600C1A359 /* GainNode.cpp in Sources */,
                                1432E8490C51493F00B1500F /* GCController.cpp in Sources */,
                                4FB390AD15EF61F3007AD51F /* GeneratedImage.cpp in Sources */,
-                               2D481F03146B5C6500AA7834 /* GeneratorGeneratedImage.cpp in Sources */,
+                               2D481F03146B5C6500AA7834 /* GradientImage.cpp in Sources */,
                                0720B0A014D3323500642955 /* GenericEventQueue.cpp in Sources */,
                                9746AF2314F4DDE6003E7A70 /* Geolocation.cpp in Sources */,
                                9746AF2614F4DDE6003E7A70 /* GeolocationController.cpp in Sources */,
index f60a66b..804e896 100644 (file)
@@ -28,8 +28,8 @@
 
 #include "CSSCalculationValue.h"
 #include "CSSValueKeywords.h"
-#include "GeneratorGeneratedImage.h"
 #include "Gradient.h"
+#include "GradientImage.h"
 #include "Image.h"
 #include "IntSize.h"
 #include "IntSizeHash.h"
@@ -67,7 +67,7 @@ PassRefPtr<Image> CSSGradientValue::image(RenderObject* renderer, const IntSize&
         gradient = static_cast<CSSRadialGradientValue*>(this)->createGradient(renderer, size);
     }
 
-    RefPtr<GeneratorGeneratedImage> newImage = GeneratorGeneratedImage::create(gradient, size);
+    RefPtr<GradientImage> newImage = GradientImage::create(gradient, size);
     if (cacheable)
         saveCachedImageForSize(size, newImage);
 
index afa2671..e5a4f59 100644 (file)
@@ -64,7 +64,7 @@ void CSSImageGeneratorValue::removeClient(RenderObject* renderer)
     deref();
 }
 
-GeneratorGeneratedImage* CSSImageGeneratorValue::cachedImageForSize(IntSize size)
+GeneratedImage* CSSImageGeneratorValue::cachedImageForSize(IntSize size)
 {
     if (size.isEmpty())
         return 0;
@@ -77,7 +77,7 @@ GeneratorGeneratedImage* CSSImageGeneratorValue::cachedImageForSize(IntSize size
     return cachedGeneratedImage->image();
 }
 
-void CSSImageGeneratorValue::saveCachedImageForSize(IntSize size, PassRefPtr<GeneratorGeneratedImage> image)
+void CSSImageGeneratorValue::saveCachedImageForSize(IntSize size, PassRefPtr<GeneratedImage> image)
 {
     ASSERT(!m_images.contains(size));
     m_images.add(size, adoptPtr(new CachedGeneratedImage(*this, size, image)));
@@ -89,7 +89,7 @@ void CSSImageGeneratorValue::evictCachedGeneratedImage(IntSize size)
     m_images.remove(size);
 }
 
-CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage(CSSImageGeneratorValue& owner, IntSize size, PassRefPtr<GeneratorGeneratedImage> image)
+CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage(CSSImageGeneratorValue& owner, IntSize size, PassRefPtr<GeneratedImage> image)
     : m_owner(owner)
     , m_size(size)
     , m_image(image)
index abb5992..68e8a82 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "CSSValue.h"
 #include "CachedImage.h"
-#include "GeneratorGeneratedImage.h"
+#include "GeneratedImage.h"
 #include "IntSizeHash.h"
 #include "Timer.h"
 #include <wtf/HashCountedSet.h>
@@ -37,7 +37,7 @@
 namespace WebCore {
 
 class CachedResourceLoader;
-class GeneratorGeneratedImage;
+class GeneratedImage;
 class RenderObject;
 class StyleResolver;
 
@@ -61,8 +61,8 @@ public:
 protected:
     CSSImageGeneratorValue(ClassType);
 
-    GeneratorGeneratedImage* cachedImageForSize(IntSize);
-    void saveCachedImageForSize(IntSize, PassRefPtr<GeneratorGeneratedImage>);
+    GeneratedImage* cachedImageForSize(IntSize);
+    void saveCachedImageForSize(IntSize, PassRefPtr<GeneratedImage>);
     const HashCountedSet<RenderObject*>& clients() const { return m_clients; }
 
     // Helper functions for Crossfade and Filter.
@@ -72,8 +72,8 @@ protected:
 private:
     class CachedGeneratedImage {
     public:
-        CachedGeneratedImage(CSSImageGeneratorValue&, IntSize, PassRefPtr<GeneratorGeneratedImage>);
-        GeneratorGeneratedImage* image() { return m_image.get(); }
+        CachedGeneratedImage(CSSImageGeneratorValue&, IntSize, PassRefPtr<GeneratedImage>);
+        GeneratedImage* image() { return m_image.get(); }
         void puntEvictionTimer() { m_evictionTimer.restart(); }
 
     private:
@@ -81,7 +81,7 @@ private:
 
         CSSImageGeneratorValue& m_owner;
         IntSize m_size;
-        RefPtr<GeneratorGeneratedImage> m_image;
+        RefPtr<GeneratedImage> m_image;
         DeferrableOneShotTimer<CachedGeneratedImage> m_evictionTimer;
     };
 
index bda91b9..20fe46e 100644 (file)
@@ -100,7 +100,7 @@ public:
 class BitmapImage FINAL : public Image {
     friend class GeneratedImage;
     friend class CrossfadeGeneratedImage;
-    friend class GeneratorGeneratedImage;
+    friend class GradientImage;
     friend class GraphicsContext;
 public:
     static PassRefPtr<BitmapImage> create(PassNativeImagePtr nativeImage, ImageObserver* observer = 0)
@@ -24,7 +24,7 @@
  */
 
 #include "config.h"
-#include "GeneratorGeneratedImage.h"
+#include "GradientImage.h"
 
 #include "FloatRect.h"
 #include "GraphicsContext.h"
@@ -32,7 +32,7 @@
 
 namespace WebCore {
 
-void GeneratorGeneratedImage::draw(GraphicsContext* destContext, const FloatRect& destRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp, BlendMode blendMode)
+void GradientImage::draw(GraphicsContext* destContext, const FloatRect& destRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp, BlendMode blendMode)
 {
     GraphicsContextStateSaver stateSaver(*destContext);
     destContext->setCompositeOperation(compositeOp, blendMode);
@@ -44,7 +44,7 @@ void GeneratorGeneratedImage::draw(GraphicsContext* destContext, const FloatRect
     destContext->fillRect(FloatRect(FloatPoint(), size()), *m_gradient.get());
 }
 
-void GeneratorGeneratedImage::drawPattern(GraphicsContext* destContext, const FloatRect& srcRect, const AffineTransform& patternTransform,
+void GradientImage::drawPattern(GraphicsContext* destContext, const FloatRect& srcRect, const AffineTransform& patternTransform,
     const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator compositeOp, const FloatRect& destRect, BlendMode)
 {
     // Allow the generator to provide visually-equivalent tiling parameters for better performance.
@@ -23,8 +23,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef GeneratorGeneratedImage_h
-#define GeneratorGeneratedImage_h
+#ifndef GradientImage_h
+#define GradientImage_h
 
 #include "GeneratedImage.h"
 #include "Gradient.h"
 
 namespace WebCore {
 
-class GeneratorGeneratedImage FINAL : public GeneratedImage {
+class GradientImage FINAL : public GeneratedImage {
 public:
-    static PassRefPtr<GeneratorGeneratedImage> create(PassRefPtr<Gradient> generator, const IntSize& size)
+    static PassRefPtr<GradientImage> create(PassRefPtr<Gradient> generator, const IntSize& size)
     {
-        return adoptRef(new GeneratorGeneratedImage(generator, size));
+        return adoptRef(new GradientImage(generator, size));
     }
 
-    virtual ~GeneratorGeneratedImage() { }
+    virtual ~GradientImage() { }
 
 protected:
     virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode) OVERRIDE;
     virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform,
         const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& destRect, BlendMode) OVERRIDE;
 
-    GeneratorGeneratedImage(PassRefPtr<Gradient> generator, const IntSize& size)
+    GradientImage(PassRefPtr<Gradient> generator, const IntSize& size)
         : m_gradient(generator)
     {
         setContainerSize(size);
index b17d983..987a56b 100644 (file)
@@ -88,7 +88,7 @@ class ImageObserver;
 class Image : public RefCounted<Image> {
     friend class GeneratedImage;
     friend class CrossfadeGeneratedImage;
-    friend class GeneratorGeneratedImage;
+    friend class GradientImage;
     friend class GraphicsContext;
 
 public:
index 9f57192..74fe2e2 100644 (file)
@@ -150,7 +150,7 @@ namespace WebCore {
         friend class GraphicsContext;
         friend class GeneratedImage;
         friend class CrossfadeGeneratedImage;
-        friend class GeneratorGeneratedImage;
+        friend class GradientImage;
 
     private:
         ImageBufferData m_data;