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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 virtual bool maybeAnimated() { return false; } | 108 virtual bool maybeAnimated() { return false; } |
109 | 109 |
110 // Typically the ImageResource that owns us. | 110 // Typically the ImageResource that owns us. |
111 ImageObserver* imageObserver() const { return m_imageObserver; } | 111 ImageObserver* imageObserver() const { return m_imageObserver; } |
112 void setImageObserver(ImageObserver* observer) { m_imageObserver = observer;
} | 112 void setImageObserver(ImageObserver* observer) { m_imageObserver = observer;
} |
113 | 113 |
114 enum TileRule { StretchTile, RoundTile, SpaceTile, RepeatTile }; | 114 enum TileRule { StretchTile, RoundTile, SpaceTile, RepeatTile }; |
115 | 115 |
116 virtual PassRefPtr<NativeImageSkia> nativeImageForCurrentFrame() { return nu
llptr; } | 116 virtual PassRefPtr<NativeImageSkia> nativeImageForCurrentFrame() { return nu
llptr; } |
117 | 117 |
| 118 virtual PassRefPtr<Image> imageForDefaultFrame(); |
| 119 |
118 virtual void drawPattern(GraphicsContext*, const FloatRect&, | 120 virtual void drawPattern(GraphicsContext*, const FloatRect&, |
119 const FloatSize&, const FloatPoint& phase, CompositeOperator, | 121 const FloatSize&, const FloatPoint& phase, CompositeOperator, |
120 const FloatRect&, blink::WebBlendMode = blink::WebBlendModeNormal, const
IntSize& repeatSpacing = IntSize()); | 122 const FloatRect&, blink::WebBlendMode = blink::WebBlendModeNormal, const
IntSize& repeatSpacing = IntSize()); |
121 | 123 |
122 #if ENABLE(ASSERT) | 124 #if ENABLE(ASSERT) |
123 virtual bool notSolidColor() { return true; } | 125 virtual bool notSolidColor() { return true; } |
124 #endif | 126 #endif |
125 | 127 |
126 protected: | 128 protected: |
127 Image(ImageObserver* = 0); | 129 Image(ImageObserver* = 0); |
(...skipping 15 matching lines...) Expand all Loading... |
143 RefPtr<SharedBuffer> m_encodedImageData; | 145 RefPtr<SharedBuffer> m_encodedImageData; |
144 ImageObserver* m_imageObserver; | 146 ImageObserver* m_imageObserver; |
145 }; | 147 }; |
146 | 148 |
147 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ | 149 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ |
148 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t
ypeName()) | 150 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t
ypeName()) |
149 | 151 |
150 } | 152 } |
151 | 153 |
152 #endif | 154 #endif |
OLD | NEW |