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