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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 String fileExtention = m_source.filenameExtension(); | 361 String fileExtention = m_source.filenameExtension(); |
362 DecodedImageType type = | 362 DecodedImageType type = |
363 fileExtention == "jpg" ? ImageJPEG : | 363 fileExtention == "jpg" ? ImageJPEG : |
364 fileExtention == "png" ? ImagePNG : | 364 fileExtention == "png" ? ImagePNG : |
365 fileExtention == "gif" ? ImageGIF : | 365 fileExtention == "gif" ? ImageGIF : |
366 fileExtention == "webp" ? ImageWebP : | 366 fileExtention == "webp" ? ImageWebP : |
367 fileExtention == "ico" ? ImageICO : | 367 fileExtention == "ico" ? ImageICO : |
368 fileExtention == "bmp" ? ImageBMP : | 368 fileExtention == "bmp" ? ImageBMP : |
369 ImageUnknown; | 369 ImageUnknown; |
370 Platform::current()->histogramEnumeration("Blink.DecodedImageType", type
, LastDecodedImageType + 1); | 370 Platform::current()->histogramEnumeration("Blink.DecodedImageType", type
, LastDecodedImageType + 1); |
| 371 Platform::current()->histogramEnumeration("Blink.DecodedImage.Orientatio
n", m_source.orientationAtIndex(0).orientation(), ImageOrientationEnumEnd); |
371 } | 372 } |
372 | 373 |
373 return m_sizeAvailable; | 374 return m_sizeAvailable; |
374 } | 375 } |
375 | 376 |
376 bool BitmapImage::ensureFrameIsCached(size_t index) | 377 bool BitmapImage::ensureFrameIsCached(size_t index) |
377 { | 378 { |
378 if (index >= frameCount()) | 379 if (index >= frameCount()) |
379 return false; | 380 return false; |
380 | 381 |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 destroyDecodedDataIfNecessary(); | 664 destroyDecodedDataIfNecessary(); |
664 | 665 |
665 // We need to draw this frame if we advanced to it while not skipping, or if | 666 // We need to draw this frame if we advanced to it while not skipping, or if |
666 // while trying to skip frames we hit the last frame and thus had to stop. | 667 // while trying to skip frames we hit the last frame and thus had to stop. |
667 if (skippingFrames != advancedAnimation) | 668 if (skippingFrames != advancedAnimation) |
668 imageObserver()->animationAdvanced(this); | 669 imageObserver()->animationAdvanced(this); |
669 return advancedAnimation; | 670 return advancedAnimation; |
670 } | 671 } |
671 | 672 |
672 } // namespace blink | 673 } // namespace blink |
OLD | NEW |