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

Unified Diff: Source/core/svg/graphics/SVGImage.h

Issue 105363002: Make SVG images for custom CSS cursors appear sharp on retina displays (Closed) Base URL: http://src.chromium.org/blink/trunk/
Patch Set: Created 7 years 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
« no previous file with comments | « Source/core/platform/graphics/Image.h ('k') | Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/graphics/SVGImage.h
===================================================================
--- Source/core/svg/graphics/SVGImage.h (revision 162906)
+++ Source/core/svg/graphics/SVGImage.h (working copy)
@@ -41,9 +41,9 @@
class SVGImage : public Image {
public:
- static PassRefPtr<SVGImage> create(ImageObserver* observer)
+ static PassRefPtr<SVGImage> create(ImageObserver* observer, float deviceScaleFactor)
{
- return adoptRef(new SVGImage(observer));
+ return adoptRef(new SVGImage(observer, deviceScaleFactor));
}
static bool isInSVGImage(const Element*);
@@ -62,7 +62,7 @@
virtual void stopAnimation() OVERRIDE;
virtual void resetAnimation() OVERRIDE;
- virtual PassRefPtr<NativeImageSkia> nativeImageForCurrentFrame() OVERRIDE;
+ virtual PassRefPtr<NativeImageSkia> nativeImageForCurrentFrame(ScaleHint /*hint*/ = UseNativeScale) OVERRIDE;
private:
friend class AXRenderObject;
@@ -90,7 +90,7 @@
// FIXME: Implement this to be less conservative.
virtual bool currentFrameKnownToBeOpaque() OVERRIDE { return false; }
- SVGImage(ImageObserver*);
+ SVGImage(ImageObserver*, float deviceScaleFactor);
virtual void draw(GraphicsContext*, const FloatRect& fromRect, const FloatRect& toRect, CompositeOperator, blink::WebBlendMode) OVERRIDE;
void drawForContainer(GraphicsContext*, const FloatSize, float, const FloatRect&, const FloatRect&, CompositeOperator, blink::WebBlendMode);
void drawPatternForContainer(GraphicsContext*, const FloatSize, float, const FloatRect&, const FloatSize&, const FloatPoint&,
@@ -99,6 +99,7 @@
OwnPtr<SVGImageChromeClient> m_chromeClient;
OwnPtr<Page> m_page;
IntSize m_intrinsicSize;
+ float m_deviceScaleFactor;
};
inline SVGImage* toSVGImage(Image* image)
« no previous file with comments | « Source/core/platform/graphics/Image.h ('k') | Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698