| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013, Google Inc. All rights reserved. | 2 * Copyright (c) 2013, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 public: | 51 public: |
| 52 FakeImageObserver() | 52 FakeImageObserver() |
| 53 : m_lastDecodedSize(0), m_lastDecodedSizeChangedDelta(0) {} | 53 : m_lastDecodedSize(0), m_lastDecodedSizeChangedDelta(0) {} |
| 54 | 54 |
| 55 virtual void decodedSizeChangedTo(const Image*, size_t newSize) { | 55 virtual void decodedSizeChangedTo(const Image*, size_t newSize) { |
| 56 m_lastDecodedSizeChangedDelta = | 56 m_lastDecodedSizeChangedDelta = |
| 57 safeCast<int>(newSize) - safeCast<int>(m_lastDecodedSize); | 57 safeCast<int>(newSize) - safeCast<int>(m_lastDecodedSize); |
| 58 m_lastDecodedSize = newSize; | 58 m_lastDecodedSize = newSize; |
| 59 } | 59 } |
| 60 void didDraw(const Image*) override {} | |
| 61 bool shouldPauseAnimation(const Image*) override { return false; } | 60 bool shouldPauseAnimation(const Image*) override { return false; } |
| 62 void animationAdvanced(const Image*) override {} | 61 void animationAdvanced(const Image*) override {} |
| 63 | 62 |
| 64 virtual void changedInRect(const Image*, const IntRect&) {} | 63 virtual void changedInRect(const Image*, const IntRect&) {} |
| 65 | 64 |
| 66 size_t m_lastDecodedSize; | 65 size_t m_lastDecodedSize; |
| 67 int m_lastDecodedSizeChangedDelta; | 66 int m_lastDecodedSizeChangedDelta; |
| 68 }; | 67 }; |
| 69 | 68 |
| 70 static PassRefPtr<SharedBuffer> readFile(const char* fileName) { | 69 static PassRefPtr<SharedBuffer> readFile(const char* fileName) { |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 OriginRightBottom}, | 326 OriginRightBottom}, |
| 328 {"/LayoutTests/fast/images/resources/exif-orientation-8-llo.jpg", | 327 {"/LayoutTests/fast/images/resources/exif-orientation-8-llo.jpg", |
| 329 OriginLeftBottom}}; | 328 OriginLeftBottom}}; |
| 330 | 329 |
| 331 INSTANTIATE_TEST_CASE_P( | 330 INSTANTIATE_TEST_CASE_P( |
| 332 DecodedImageOrientationHistogramTest, | 331 DecodedImageOrientationHistogramTest, |
| 333 DecodedImageOrientationHistogramTest, | 332 DecodedImageOrientationHistogramTest, |
| 334 ::testing::ValuesIn(kDecodedImageOrientationHistogramTestParams)); | 333 ::testing::ValuesIn(kDecodedImageOrientationHistogramTestParams)); |
| 335 | 334 |
| 336 } // namespace blink | 335 } // namespace blink |
| OLD | NEW |