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, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 bool BitmapImage::hasColorProfile() const | 251 bool BitmapImage::hasColorProfile() const |
252 { | 252 { |
253 return m_source.hasColorProfile(); | 253 return m_source.hasColorProfile(); |
254 } | 254 } |
255 | 255 |
256 String BitmapImage::filenameExtension() const | 256 String BitmapImage::filenameExtension() const |
257 { | 257 { |
258 return m_source.filenameExtension(); | 258 return m_source.filenameExtension(); |
259 } | 259 } |
260 | 260 |
261 void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dstRect, const Fl
oatRect& srcRect, CompositeOperator compositeOp, blink::WebBlendMode blendMode) | 261 void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dstRect, const Fl
oatRect& srcRect, CompositeOperator compositeOp, WebBlendMode blendMode) |
262 { | 262 { |
263 draw(ctxt, dstRect, srcRect, compositeOp, blendMode, DoNotRespectImageOrient
ation); | 263 draw(ctxt, dstRect, srcRect, compositeOp, blendMode, DoNotRespectImageOrient
ation); |
264 } | 264 } |
265 | 265 |
266 void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dstRect, const Fl
oatRect& srcRect, CompositeOperator compositeOp, blink::WebBlendMode blendMode,
RespectImageOrientationEnum shouldRespectImageOrientation) | 266 void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dstRect, const Fl
oatRect& srcRect, CompositeOperator compositeOp, WebBlendMode blendMode, Respect
ImageOrientationEnum shouldRespectImageOrientation) |
267 { | 267 { |
268 // Spin the animation to the correct frame before we try to draw it, so we | 268 // Spin the animation to the correct frame before we try to draw it, so we |
269 // don't draw an old frame and then immediately need to draw a newer one, | 269 // don't draw an old frame and then immediately need to draw a newer one, |
270 // causing flicker and wasting CPU. | 270 // causing flicker and wasting CPU. |
271 startAnimation(); | 271 startAnimation(); |
272 | 272 |
273 RefPtr<NativeImageSkia> bm = nativeImageForCurrentFrame(); | 273 RefPtr<NativeImageSkia> bm = nativeImageForCurrentFrame(); |
274 if (!bm) | 274 if (!bm) |
275 return; // It's too early and we don't have an image yet. | 275 return; // It's too early and we don't have an image yet. |
276 | 276 |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 ASSERT(m_checkedForSolidColor); | 630 ASSERT(m_checkedForSolidColor); |
631 } | 631 } |
632 return m_isSolidColor && !m_currentFrame; | 632 return m_isSolidColor && !m_currentFrame; |
633 } | 633 } |
634 | 634 |
635 Color BitmapImage::solidColor() const | 635 Color BitmapImage::solidColor() const |
636 { | 636 { |
637 return m_solidColor; | 637 return m_solidColor; |
638 } | 638 } |
639 | 639 |
640 } | 640 } // namespace blink |
OLD | NEW |