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 66 matching lines...) Loading... |
77 void destroyDecodedData() { m_image->destroyDecodedData(); } | 77 void destroyDecodedData() { m_image->destroyDecodedData(); } |
78 size_t frameCount() { return m_image->frameCount(); } | 78 size_t frameCount() { return m_image->frameCount(); } |
79 PassRefPtr<SkImage> frameAtIndex(size_t index) | 79 PassRefPtr<SkImage> frameAtIndex(size_t index) |
80 { | 80 { |
81 return m_image->frameAtIndex(index); | 81 return m_image->frameAtIndex(index); |
82 } | 82 } |
83 void setCurrentFrame(size_t frame) { m_image->m_currentFrame = frame; } | 83 void setCurrentFrame(size_t frame) { m_image->m_currentFrame = frame; } |
84 size_t frameDecodedSize(size_t frame) { return m_image->m_frames[frame].m_fr
ameBytes; } | 84 size_t frameDecodedSize(size_t frame) { return m_image->m_frames[frame].m_fr
ameBytes; } |
85 size_t decodedFramesCount() const { return m_image->m_frames.size(); } | 85 size_t decodedFramesCount() const { return m_image->m_frames.size(); } |
86 | 86 |
87 void setFirstFrameNotComplete() { m_image->m_frames[0].m_isComplete = false;
} | 87 void setFirstFrameNotComplete() { m_image->m_frames[0].m_isFullyReceived = f
alse; } |
88 | 88 |
89 void loadImage(const char* fileName, bool loadAllFrames = true) | 89 void loadImage(const char* fileName, bool loadAllFrames = true) |
90 { | 90 { |
91 RefPtr<SharedBuffer> imageData = readFile(fileName); | 91 RefPtr<SharedBuffer> imageData = readFile(fileName); |
92 ASSERT_TRUE(imageData.get()); | 92 ASSERT_TRUE(imageData.get()); |
93 | 93 |
94 m_image->setData(imageData, true); | 94 m_image->setData(imageData, true); |
95 EXPECT_EQ(0u, decodedSize()); | 95 EXPECT_EQ(0u, decodedSize()); |
96 | 96 |
97 size_t frameCount = m_image->frameCount(); | 97 size_t frameCount = m_image->frameCount(); |
(...skipping 231 matching lines...) Loading... |
329 {"/LayoutTests/fast/images/resources/exif-orientation-5-lu.jpg", OriginLeftT
op}, | 329 {"/LayoutTests/fast/images/resources/exif-orientation-5-lu.jpg", OriginLeftT
op}, |
330 {"/LayoutTests/fast/images/resources/exif-orientation-6-ru.jpg", OriginRight
Top}, | 330 {"/LayoutTests/fast/images/resources/exif-orientation-6-ru.jpg", OriginRight
Top}, |
331 {"/LayoutTests/fast/images/resources/exif-orientation-7-rl.jpg", OriginRight
Bottom}, | 331 {"/LayoutTests/fast/images/resources/exif-orientation-7-rl.jpg", OriginRight
Bottom}, |
332 {"/LayoutTests/fast/images/resources/exif-orientation-8-llo.jpg", OriginLeft
Bottom} | 332 {"/LayoutTests/fast/images/resources/exif-orientation-8-llo.jpg", OriginLeft
Bottom} |
333 }; | 333 }; |
334 | 334 |
335 INSTANTIATE_TEST_CASE_P(DecodedImageOrientationHistogramTest, DecodedImageOrient
ationHistogramTest, | 335 INSTANTIATE_TEST_CASE_P(DecodedImageOrientationHistogramTest, DecodedImageOrient
ationHistogramTest, |
336 ::testing::ValuesIn(kDecodedImageOrientationHistogramTestParams)); | 336 ::testing::ValuesIn(kDecodedImageOrientationHistogramTestParams)); |
337 | 337 |
338 } // namespace blink | 338 } // namespace blink |
OLD | NEW |