Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1650)

Unified Diff: Source/core/platform/graphics/ImageCache.h

Issue 25627006: Generalize ImageForContainer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/platform/graphics/ImageCache.h
diff --git a/Source/core/svg/graphics/SVGImageCache.h b/Source/core/platform/graphics/ImageCache.h
similarity index 78%
rename from Source/core/svg/graphics/SVGImageCache.h
rename to Source/core/platform/graphics/ImageCache.h
index 677444ebc78ceb56ec71ac7047442774c6893aeb..1d9d3b9530eab06b993363db03479bea58fb6a58 100644
--- a/Source/core/svg/graphics/SVGImageCache.h
+++ b/Source/core/platform/graphics/ImageCache.h
@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef SVGImageCache_h
-#define SVGImageCache_h
+#ifndef ImageCache_h
+#define ImageCache_h
#include "core/platform/graphics/Image.h"
#include "platform/geometry/FloatSize.h"
@@ -32,18 +32,18 @@ namespace WebCore {
class ImageResource;
class ImageResourceClient;
class ImageBuffer;
-class SVGImage;
-class SVGImageForContainer;
+class Image;
+class ImageForContainer;
class RenderObject;
-class SVGImageCache {
+class ImageCache {
WTF_MAKE_FAST_ALLOCATED;
public:
- ~SVGImageCache();
+ ~ImageCache();
- static PassOwnPtr<SVGImageCache> create(SVGImage* image)
+ static PassOwnPtr<ImageCache> create(Image* image)
{
- return adoptPtr(new SVGImageCache(image));
+ return adoptPtr(new ImageCache(image));
}
void removeClientFromCache(const ImageResourceClient*);
@@ -54,14 +54,14 @@ public:
Image* imageForRenderer(const RenderObject*);
private:
- SVGImageCache(SVGImage*);
+ ImageCache(Image*);
- typedef HashMap<const ImageResourceClient*, RefPtr<SVGImageForContainer> > ImageForContainerMap;
+ typedef HashMap<const ImageResourceClient*, RefPtr<ImageForContainer> > ImageForContainerMap;
- SVGImage* m_svgImage;
+ Image* m_image;
ImageForContainerMap m_imageForContainerMap;
};
} // namespace WebCore
-#endif // SVGImageCache_h
+#endif // ImageCache_h

Powered by Google App Engine
This is Rietveld 408576698