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

Side by Side Diff: Source/core/platform/graphics/Image.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 unified diff | Download patch
« no previous file with comments | « Source/core/platform/graphics/BitmapImage.cpp ('k') | Source/core/svg/graphics/SVGImage.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 virtual void startAnimation(bool /*catchUpIfNecessary*/ = true) { } 100 virtual void startAnimation(bool /*catchUpIfNecessary*/ = true) { }
101 virtual void stopAnimation() {} 101 virtual void stopAnimation() {}
102 virtual void resetAnimation() {} 102 virtual void resetAnimation() {}
103 103
104 // Typically the ImageResource that owns us. 104 // Typically the ImageResource that owns us.
105 ImageObserver* imageObserver() const { return m_imageObserver; } 105 ImageObserver* imageObserver() const { return m_imageObserver; }
106 void setImageObserver(ImageObserver* observer) { m_imageObserver = observer; } 106 void setImageObserver(ImageObserver* observer) { m_imageObserver = observer; }
107 107
108 enum TileRule { StretchTile, RoundTile, SpaceTile, RepeatTile }; 108 enum TileRule { StretchTile, RoundTile, SpaceTile, RepeatTile };
109 109
110 virtual PassRefPtr<NativeImageSkia> nativeImageForCurrentFrame() { return 0; } 110 enum ScaleHint {
111 UseNativeScale,
112 PreferDeviceScale
113 };
114
115 virtual PassRefPtr<NativeImageSkia> nativeImageForCurrentFrame(ScaleHint /*h int*/ = UseNativeScale) { return 0; }
111 116
112 virtual void drawPattern(GraphicsContext*, const FloatRect&, 117 virtual void drawPattern(GraphicsContext*, const FloatRect&,
113 const FloatSize&, const FloatPoint& phase, CompositeOperator, 118 const FloatSize&, const FloatPoint& phase, CompositeOperator,
114 const FloatRect&, blink::WebBlendMode = blink::WebBlendModeNormal, const IntSize& repeatSpacing = IntSize()); 119 const FloatRect&, blink::WebBlendMode = blink::WebBlendModeNormal, const IntSize& repeatSpacing = IntSize());
115 120
116 #if !ASSERT_DISABLED 121 #if !ASSERT_DISABLED
117 virtual bool notSolidColor() { return true; } 122 virtual bool notSolidColor() { return true; }
118 #endif 123 #endif
119 124
120 protected: 125 protected:
(...skipping 13 matching lines...) Expand all
134 virtual Color solidColor() const { return Color(); } 139 virtual Color solidColor() const { return Color(); }
135 140
136 private: 141 private:
137 RefPtr<SharedBuffer> m_encodedImageData; 142 RefPtr<SharedBuffer> m_encodedImageData;
138 ImageObserver* m_imageObserver; 143 ImageObserver* m_imageObserver;
139 }; 144 };
140 145
141 } 146 }
142 147
143 #endif 148 #endif
OLDNEW
« no previous file with comments | « Source/core/platform/graphics/BitmapImage.cpp ('k') | Source/core/svg/graphics/SVGImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698