OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |