| 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 296 |
| 297 ctxt->concatCTM(orientation.transformFromDefault(normDstRect.size())); | 297 ctxt->concatCTM(orientation.transformFromDefault(normDstRect.size())); |
| 298 | 298 |
| 299 if (orientation.usesWidthAsHeight()) { | 299 if (orientation.usesWidthAsHeight()) { |
| 300 // The destination rect will have it's width and height already reve
rsed for the orientation of | 300 // The destination rect will have it's width and height already reve
rsed for the orientation of |
| 301 // the image, as it was needed for page layout, so we need to revers
e it back here. | 301 // the image, as it was needed for page layout, so we need to revers
e it back here. |
| 302 normDstRect = FloatRect(normDstRect.x(), normDstRect.y(), normDstRec
t.height(), normDstRect.width()); | 302 normDstRect = FloatRect(normDstRect.x(), normDstRect.y(), normDstRec
t.height(), normDstRect.width()); |
| 303 } | 303 } |
| 304 } | 304 } |
| 305 | 305 |
| 306 bm->draw(ctxt, normSrcRect, normDstRect, WebCoreCompositeToSkiaComposite(com
positeOp, blendMode)); | 306 bm->draw(ctxt, normSrcRect, normDstRect, compositeOp, blendMode); |
| 307 | 307 |
| 308 if (ImageObserver* observer = imageObserver()) | 308 if (ImageObserver* observer = imageObserver()) |
| 309 observer->didDraw(this); | 309 observer->didDraw(this); |
| 310 } | 310 } |
| 311 | 311 |
| 312 size_t BitmapImage::frameCount() | 312 size_t BitmapImage::frameCount() |
| 313 { | 313 { |
| 314 if (!m_haveFrameCount) { | 314 if (!m_haveFrameCount) { |
| 315 m_frameCount = m_source.frameCount(); | 315 m_frameCount = m_source.frameCount(); |
| 316 // If decoder is not initialized yet, m_source.frameCount() returns 0. | 316 // If decoder is not initialized yet, m_source.frameCount() returns 0. |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 } | 624 } |
| 625 return m_isSolidColor && !m_currentFrame; | 625 return m_isSolidColor && !m_currentFrame; |
| 626 } | 626 } |
| 627 | 627 |
| 628 Color BitmapImage::solidColor() const | 628 Color BitmapImage::solidColor() const |
| 629 { | 629 { |
| 630 return m_solidColor; | 630 return m_solidColor; |
| 631 } | 631 } |
| 632 | 632 |
| 633 } | 633 } |
| OLD | NEW |