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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 static PassRefPtr<SharedBuffer> readFile(const char* fileName) { | 69 static PassRefPtr<SharedBuffer> readFile(const char* fileName) { |
70 String filePath = testing::blinkRootDir(); | 70 String filePath = testing::blinkRootDir(); |
71 filePath.append(fileName); | 71 filePath.append(fileName); |
72 return testing::readFromFile(filePath); | 72 return testing::readFromFile(filePath); |
73 } | 73 } |
74 | 74 |
75 // Accessors to BitmapImage's protected methods. | 75 // Accessors to BitmapImage's protected methods. |
76 void destroyDecodedData() { m_image->destroyDecodedData(); } | 76 void destroyDecodedData() { m_image->destroyDecodedData(); } |
77 size_t frameCount() { return m_image->frameCount(); } | 77 size_t frameCount() { return m_image->frameCount(); } |
78 sk_sp<SkImage> frameAtIndex(size_t index) { | 78 sk_sp<SkImage> frameAtIndex(size_t index) { |
79 return m_image->frameAtIndex(index); | 79 return m_image->frameAtIndex(index, m_image->m_cachedFrameColorBehavior); |
80 } | 80 } |
81 void setCurrentFrame(size_t frame) { m_image->m_currentFrame = frame; } | 81 void setCurrentFrame(size_t frame) { m_image->m_currentFrame = frame; } |
82 size_t frameDecodedSize(size_t frame) { | 82 size_t frameDecodedSize(size_t frame) { |
83 return m_image->m_frames[frame].m_frameBytes; | 83 return m_image->m_frames[frame].m_frameBytes; |
84 } | 84 } |
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_isComplete = false; } |
88 | 88 |
89 void loadImage(const char* fileName, bool loadAllFrames = true) { | 89 void loadImage(const char* fileName, bool loadAllFrames = true) { |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 OriginRightBottom}, | 326 OriginRightBottom}, |
327 {"/LayoutTests/images/resources/exif-orientation-8-llo.jpg", | 327 {"/LayoutTests/images/resources/exif-orientation-8-llo.jpg", |
328 OriginLeftBottom}}; | 328 OriginLeftBottom}}; |
329 | 329 |
330 INSTANTIATE_TEST_CASE_P( | 330 INSTANTIATE_TEST_CASE_P( |
331 DecodedImageOrientationHistogramTest, | 331 DecodedImageOrientationHistogramTest, |
332 DecodedImageOrientationHistogramTest, | 332 DecodedImageOrientationHistogramTest, |
333 ::testing::ValuesIn(kDecodedImageOrientationHistogramTestParams)); | 333 ::testing::ValuesIn(kDecodedImageOrientationHistogramTestParams)); |
334 | 334 |
335 } // namespace blink | 335 } // namespace blink |
OLD | NEW |