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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator,
const FloatRect& destRect, BlendMode = BlendModeNormal); | 116 const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator,
const FloatRect& destRect, BlendMode = BlendModeNormal); |
117 | 117 |
118 #if ENABLE(IMAGE_DECODER_DOWN_SAMPLING) | 118 #if ENABLE(IMAGE_DECODER_DOWN_SAMPLING) |
119 FloatRect adjustSourceRectForDownSampling(const FloatRect& srcRect, const In
tSize& scaledSize) const; | 119 FloatRect adjustSourceRectForDownSampling(const FloatRect& srcRect, const In
tSize& scaledSize) const; |
120 #endif | 120 #endif |
121 | 121 |
122 #if !ASSERT_DISABLED | 122 #if !ASSERT_DISABLED |
123 virtual bool notSolidColor() { return true; } | 123 virtual bool notSolidColor() { return true; } |
124 #endif | 124 #endif |
125 | 125 |
126 virtual void reportMemoryUsage(MemoryObjectInfo*) const; | |
127 | |
128 protected: | 126 protected: |
129 Image(ImageObserver* = 0); | 127 Image(ImageObserver* = 0); |
130 | 128 |
131 static void fillWithSolidColor(GraphicsContext*, const FloatRect& dstRect, c
onst Color&, ColorSpace styleColorSpace, CompositeOperator); | 129 static void fillWithSolidColor(GraphicsContext*, const FloatRect& dstRect, c
onst Color&, ColorSpace styleColorSpace, CompositeOperator); |
132 | 130 |
133 // The ColorSpace parameter will only be used for untagged images. | 131 // The ColorSpace parameter will only be used for untagged images. |
134 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRec
t& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode) = 0; | 132 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRec
t& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode) = 0; |
135 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRec
t& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode, RespectIma
geOrientationEnum); | 133 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRec
t& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode, RespectIma
geOrientationEnum); |
136 void drawTiled(GraphicsContext*, const FloatRect& dstRect, const FloatPoint&
srcPoint, const FloatSize& tileSize, ColorSpace styleColorSpace, | 134 void drawTiled(GraphicsContext*, const FloatRect& dstRect, const FloatPoint&
srcPoint, const FloatSize& tileSize, ColorSpace styleColorSpace, |
137 CompositeOperator , BlendMode); | 135 CompositeOperator , BlendMode); |
138 void drawTiled(GraphicsContext*, const FloatRect& dstRect, const FloatRect&
srcRect, const FloatSize& tileScaleFactor, TileRule hRule, TileRule vRule, Color
Space styleColorSpace, CompositeOperator); | 136 void drawTiled(GraphicsContext*, const FloatRect& dstRect, const FloatRect&
srcRect, const FloatSize& tileScaleFactor, TileRule hRule, TileRule vRule, Color
Space styleColorSpace, CompositeOperator); |
139 | 137 |
140 // Supporting tiled drawing | 138 // Supporting tiled drawing |
141 virtual bool mayFillWithSolidColor() { return false; } | 139 virtual bool mayFillWithSolidColor() { return false; } |
142 virtual Color solidColor() const { return Color(); } | 140 virtual Color solidColor() const { return Color(); } |
143 | 141 |
144 private: | 142 private: |
145 RefPtr<SharedBuffer> m_encodedImageData; | 143 RefPtr<SharedBuffer> m_encodedImageData; |
146 ImageObserver* m_imageObserver; | 144 ImageObserver* m_imageObserver; |
147 }; | 145 }; |
148 | 146 |
149 } | 147 } |
150 | 148 |
151 #endif | 149 #endif |
OLD | NEW |