| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 void destroyDecodedData(bool destroyAll) { m_image->destroyDecodedData(destr
oyAll); } | 74 void destroyDecodedData(bool destroyAll) { m_image->destroyDecodedData(destr
oyAll); } |
| 75 size_t frameCount() { return m_image->frameCount(); } | 75 size_t frameCount() { return m_image->frameCount(); } |
| 76 void frameAtIndex(size_t index) | 76 void frameAtIndex(size_t index) |
| 77 { | 77 { |
| 78 m_image->frameAtIndex(index); | 78 m_image->frameAtIndex(index); |
| 79 } | 79 } |
| 80 void setCurrentFrame(size_t frame) { m_image->m_currentFrame = frame; } | 80 void setCurrentFrame(size_t frame) { m_image->m_currentFrame = frame; } |
| 81 size_t frameDecodedSize(size_t frame) { return m_image->m_frames[frame].m_fr
ameBytes; } | 81 size_t frameDecodedSize(size_t frame) { return m_image->m_frames[frame].m_fr
ameBytes; } |
| 82 size_t decodedFramesCount() const { return m_image->m_frames.size(); } | 82 size_t decodedFramesCount() const { return m_image->m_frames.size(); } |
| 83 | 83 |
| 84 void setFirstFrameNotComplete() { m_image->m_frames[0].m_isComplete = false;
} | 84 void setFirstFrameNotComplete() { m_image->m_frames[0].m_isFullyReceived = f
alse; } |
| 85 | 85 |
| 86 void loadImage(const char* fileName, bool loadAllFrames = true) | 86 void loadImage(const char* fileName, bool loadAllFrames = true) |
| 87 { | 87 { |
| 88 RefPtr<SharedBuffer> imageData = readFile(fileName); | 88 RefPtr<SharedBuffer> imageData = readFile(fileName); |
| 89 ASSERT_TRUE(imageData.get()); | 89 ASSERT_TRUE(imageData.get()); |
| 90 | 90 |
| 91 m_image->setData(imageData, true); | 91 m_image->setData(imageData, true); |
| 92 EXPECT_EQ(0u, decodedSize()); | 92 EXPECT_EQ(0u, decodedSize()); |
| 93 | 93 |
| 94 size_t frameCount = m_image->frameCount(); | 94 size_t frameCount = m_image->frameCount(); |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 {"/LayoutTests/fast/images/resources/exif-orientation-5-lu.jpg", OriginLeftT
op}, | 368 {"/LayoutTests/fast/images/resources/exif-orientation-5-lu.jpg", OriginLeftT
op}, |
| 369 {"/LayoutTests/fast/images/resources/exif-orientation-6-ru.jpg", OriginRight
Top}, | 369 {"/LayoutTests/fast/images/resources/exif-orientation-6-ru.jpg", OriginRight
Top}, |
| 370 {"/LayoutTests/fast/images/resources/exif-orientation-7-rl.jpg", OriginRight
Bottom}, | 370 {"/LayoutTests/fast/images/resources/exif-orientation-7-rl.jpg", OriginRight
Bottom}, |
| 371 {"/LayoutTests/fast/images/resources/exif-orientation-8-llo.jpg", OriginLeft
Bottom} | 371 {"/LayoutTests/fast/images/resources/exif-orientation-8-llo.jpg", OriginLeft
Bottom} |
| 372 }; | 372 }; |
| 373 | 373 |
| 374 INSTANTIATE_TEST_CASE_P(DecodedImageOrientationHistogramTest, DecodedImageOrient
ationHistogramTest, | 374 INSTANTIATE_TEST_CASE_P(DecodedImageOrientationHistogramTest, DecodedImageOrient
ationHistogramTest, |
| 375 ::testing::ValuesIn(kDecodedImageOrientationHistogramTestParams)); | 375 ::testing::ValuesIn(kDecodedImageOrientationHistogramTestParams)); |
| 376 | 376 |
| 377 } // namespace blink | 377 } // namespace blink |
| OLD | NEW |