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

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

Issue 2054643003: Remove duplication of encoded image data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bug fix Created 4 years, 5 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 PassRefPtr<Image> imageForDefaultFrame() 133 PassRefPtr<Image> imageForDefaultFrame()
134 { 134 {
135 return m_image->imageForDefaultFrame(); 135 return m_image->imageForDefaultFrame();
136 } 136 }
137 137
138 int lastDecodedSizeChange() 138 int lastDecodedSizeChange()
139 { 139 {
140 return m_imageObserver->m_lastDecodedSizeChangedDelta; 140 return m_imageObserver->m_lastDecodedSizeChangedDelta;
141 } 141 }
142 142
143 PassRefPtr<SharedBuffer> data() { return m_image->data(); }
144
143 protected: 145 protected:
144 void SetUp() override 146 void SetUp() override
145 { 147 {
146 m_imageObserver = new FakeImageObserver; 148 m_imageObserver = new FakeImageObserver;
147 m_image = BitmapImage::create(m_imageObserver.get()); 149 m_image = BitmapImage::create(m_imageObserver.get());
148 } 150 }
149 151
150 Persistent<FakeImageObserver> m_imageObserver; 152 Persistent<FakeImageObserver> m_imageObserver;
151 RefPtr<BitmapImage> m_image; 153 RefPtr<BitmapImage> m_image;
152 }; 154 };
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 {"/LayoutTests/fast/images/resources/exif-orientation-5-lu.jpg", OriginLeftT op}, 331 {"/LayoutTests/fast/images/resources/exif-orientation-5-lu.jpg", OriginLeftT op},
330 {"/LayoutTests/fast/images/resources/exif-orientation-6-ru.jpg", OriginRight Top}, 332 {"/LayoutTests/fast/images/resources/exif-orientation-6-ru.jpg", OriginRight Top},
331 {"/LayoutTests/fast/images/resources/exif-orientation-7-rl.jpg", OriginRight Bottom}, 333 {"/LayoutTests/fast/images/resources/exif-orientation-7-rl.jpg", OriginRight Bottom},
332 {"/LayoutTests/fast/images/resources/exif-orientation-8-llo.jpg", OriginLeft Bottom} 334 {"/LayoutTests/fast/images/resources/exif-orientation-8-llo.jpg", OriginLeft Bottom}
333 }; 335 };
334 336
335 INSTANTIATE_TEST_CASE_P(DecodedImageOrientationHistogramTest, DecodedImageOrient ationHistogramTest, 337 INSTANTIATE_TEST_CASE_P(DecodedImageOrientationHistogramTest, DecodedImageOrient ationHistogramTest,
336 ::testing::ValuesIn(kDecodedImageOrientationHistogramTestParams)); 338 ::testing::ValuesIn(kDecodedImageOrientationHistogramTestParams));
337 339
338 } // namespace blink 340 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698