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