Chromium Code Reviews| 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 291 if (orientation.usesWidthAsHeight()) { | 291 if (orientation.usesWidthAsHeight()) { |
| 292 // The destination rect will have its width and height already reversed | 292 // The destination rect will have its width and height already reversed |
| 293 // for the orientation of the image, as it was needed for page layout, so | 293 // for the orientation of the image, as it was needed for page layout, so |
| 294 // we need to reverse it back here. | 294 // we need to reverse it back here. |
| 295 adjustedDstRect = | 295 adjustedDstRect = |
| 296 FloatRect(adjustedDstRect.x(), adjustedDstRect.y(), | 296 FloatRect(adjustedDstRect.x(), adjustedDstRect.y(), |
| 297 adjustedDstRect.height(), adjustedDstRect.width()); | 297 adjustedDstRect.height(), adjustedDstRect.width()); |
| 298 } | 298 } |
| 299 } | 299 } |
| 300 | 300 |
| 301 canvas->drawImageRect(image.get(), adjustedSrcRect, adjustedDstRect, &flags, | 301 canvas->drawImageRect(image, adjustedSrcRect, adjustedDstRect, &flags, |
|
danakj
2017/03/16 20:06:15
if you grab the lazygen and uniqueid, you could mo
| |
| 302 WebCoreClampingModeToSkiaRectConstraint(clampMode)); | 302 WebCoreClampingModeToSkiaRectConstraint(clampMode)); |
| 303 | 303 |
| 304 if (image->isLazyGenerated()) | 304 if (image->isLazyGenerated()) |
| 305 PlatformInstrumentation::didDrawLazyPixelRef(image->uniqueID()); | 305 PlatformInstrumentation::didDrawLazyPixelRef(image->uniqueID()); |
| 306 | 306 |
| 307 startAnimation(); | 307 startAnimation(); |
| 308 } | 308 } |
| 309 | 309 |
| 310 size_t BitmapImage::frameCount() { | 310 size_t BitmapImage::frameCount() { |
| 311 if (!m_haveFrameCount) { | 311 if (!m_haveFrameCount) { |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 635 getImageObserver()->animationAdvanced(this); | 635 getImageObserver()->animationAdvanced(this); |
| 636 | 636 |
| 637 return true; | 637 return true; |
| 638 } | 638 } |
| 639 | 639 |
| 640 void BitmapImage::notifyObserversOfAnimationAdvance(TimerBase*) { | 640 void BitmapImage::notifyObserversOfAnimationAdvance(TimerBase*) { |
| 641 getImageObserver()->animationAdvanced(this); | 641 getImageObserver()->animationAdvanced(this); |
| 642 } | 642 } |
| 643 | 643 |
| 644 } // namespace blink | 644 } // namespace blink |
| OLD | NEW |