Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp

Issue 2290903002: Change (Pass)RefPtr<SkXxx> into sk_sp<SkXxx>. (Closed)
Patch Set: Rebasing... Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
69 static PassRefPtr<SharedBuffer> readFile(const char* fileName) 69 static PassRefPtr<SharedBuffer> readFile(const char* fileName)
70 { 70 {
71 String filePath = testing::blinkRootDir(); 71 String filePath = testing::blinkRootDir();
72 filePath.append(fileName); 72 filePath.append(fileName);
73 return testing::readFromFile(filePath); 73 return testing::readFromFile(filePath);
74 } 74 }
75 75
76 // Accessors to BitmapImage's protected methods. 76 // Accessors to BitmapImage's protected methods.
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 sk_sp<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_isComplete = false; }
88 88
89 void loadImage(const char* fileName, bool loadAllFrames = true) 89 void loadImage(const char* fileName, bool loadAllFrames = true)
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 {"/LayoutTests/fast/images/resources/exif-orientation-5-lu.jpg", OriginLeftT op}, 327 {"/LayoutTests/fast/images/resources/exif-orientation-5-lu.jpg", OriginLeftT op},
328 {"/LayoutTests/fast/images/resources/exif-orientation-6-ru.jpg", OriginRight Top}, 328 {"/LayoutTests/fast/images/resources/exif-orientation-6-ru.jpg", OriginRight Top},
329 {"/LayoutTests/fast/images/resources/exif-orientation-7-rl.jpg", OriginRight Bottom}, 329 {"/LayoutTests/fast/images/resources/exif-orientation-7-rl.jpg", OriginRight Bottom},
330 {"/LayoutTests/fast/images/resources/exif-orientation-8-llo.jpg", OriginLeft Bottom} 330 {"/LayoutTests/fast/images/resources/exif-orientation-8-llo.jpg", OriginLeft Bottom}
331 }; 331 };
332 332
333 INSTANTIATE_TEST_CASE_P(DecodedImageOrientationHistogramTest, DecodedImageOrient ationHistogramTest, 333 INSTANTIATE_TEST_CASE_P(DecodedImageOrientationHistogramTest, DecodedImageOrient ationHistogramTest,
334 ::testing::ValuesIn(kDecodedImageOrientationHistogramTestParams)); 334 ::testing::ValuesIn(kDecodedImageOrientationHistogramTestParams));
335 335
336 } // namespace blink 336 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698