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

Side by Side Diff: tests/ImageDecodingTest.cpp

Issue 24269006: Add an option on SkImageDecoder to skip writing 0s. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Rebase, plus update the benchmark Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/images/SkScaledBitmapSampler.cpp ('k') | tools/skimage_main.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkColor.h" 10 #include "SkColor.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 SkDebugf("could not build a tile index\n"); 248 SkDebugf("could not build a tile index\n");
249 continue; 249 continue;
250 } 250 }
251 // Now unref the stream to make sure it survives 251 // Now unref the stream to make sure it survives
252 stream.reset(NULL); 252 stream.reset(NULL);
253 SkBitmap bm; 253 SkBitmap bm;
254 decoder->decodeSubset(&bm, SkIRect::MakeWH(width, height), 254 decoder->decodeSubset(&bm, SkIRect::MakeWH(width, height),
255 SkBitmap::kARGB_8888_Config); 255 SkBitmap::kARGB_8888_Config);
256 } 256 }
257 } 257 }
258 #endif 258
259 // Test inside SkScaledBitmapSampler.cpp
260 extern void test_row_proc_choice();
261
262 #endif // SK_DEBUG
259 263
260 static void test_imageDecodingTests(skiatest::Reporter* reporter) { 264 static void test_imageDecodingTests(skiatest::Reporter* reporter) {
261 test_unpremul(reporter); 265 test_unpremul(reporter);
262 test_pref_config_table(reporter); 266 test_pref_config_table(reporter);
263 #ifdef SK_DEBUG 267 #ifdef SK_DEBUG
264 test_stream_life(); 268 test_stream_life();
269 test_row_proc_choice();
265 #endif 270 #endif
266 } 271 }
267 272
268 #include "TestClassDef.h" 273 #include "TestClassDef.h"
269 DEFINE_TESTCLASS("ImageDecoding", ImageDecodingTestClass, 274 DEFINE_TESTCLASS("ImageDecoding", ImageDecodingTestClass,
270 test_imageDecodingTests) 275 test_imageDecodingTests)
OLDNEW
« no previous file with comments | « src/images/SkScaledBitmapSampler.cpp ('k') | tools/skimage_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698