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

Side by Side Diff: tests/ImageDecodingTest.cpp

Issue 100113004: Use DEFINE_TESTCLASS_SHORT macro in tests. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years 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 | « tests/ImageCacheTest.cpp ('k') | tests/InfRectTest.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 "Test.h"
9 #include "TestClassDef.h"
8 #include "SkBitmap.h" 10 #include "SkBitmap.h"
9 #include "SkCanvas.h" 11 #include "SkCanvas.h"
10 #include "SkColor.h" 12 #include "SkColor.h"
11 #include "SkColorPriv.h" 13 #include "SkColorPriv.h"
12 #include "SkData.h" 14 #include "SkData.h"
13 #include "SkForceLinking.h" 15 #include "SkForceLinking.h"
14 #include "SkGradientShader.h" 16 #include "SkGradientShader.h"
15 #include "SkImageDecoder.h" 17 #include "SkImageDecoder.h"
16 #include "SkImageEncoder.h" 18 #include "SkImageEncoder.h"
17 #include "SkOSFile.h" 19 #include "SkOSFile.h"
18 #include "SkPoint.h" 20 #include "SkPoint.h"
19 #include "SkShader.h" 21 #include "SkShader.h"
20 #include "SkStream.h" 22 #include "SkStream.h"
21 #include "SkString.h" 23 #include "SkString.h"
22 #include "Test.h"
23 24
24 __SK_FORCE_IMAGE_DECODER_LINKING; 25 __SK_FORCE_IMAGE_DECODER_LINKING;
25 26
26 /** 27 /**
27 * Interprets c as an unpremultiplied color, and returns the 28 * Interprets c as an unpremultiplied color, and returns the
28 * premultiplied equivalent. 29 * premultiplied equivalent.
29 */ 30 */
30 static SkPMColor premultiply_unpmcolor(SkPMColor c) { 31 static SkPMColor premultiply_unpmcolor(SkPMColor c) {
31 U8CPU a = SkGetPackedA32(c); 32 U8CPU a = SkGetPackedA32(c);
32 U8CPU r = SkGetPackedR32(c); 33 U8CPU r = SkGetPackedR32(c);
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 decoder->decodeSubset(&bm, SkIRect::MakeWH(width, height), 222 decoder->decodeSubset(&bm, SkIRect::MakeWH(width, height),
222 SkBitmap::kARGB_8888_Config); 223 SkBitmap::kARGB_8888_Config);
223 } 224 }
224 } 225 }
225 226
226 // Test inside SkScaledBitmapSampler.cpp 227 // Test inside SkScaledBitmapSampler.cpp
227 extern void test_row_proc_choice(); 228 extern void test_row_proc_choice();
228 229
229 #endif // SK_DEBUG 230 #endif // SK_DEBUG
230 231
231 static void test_imageDecodingTests(skiatest::Reporter* reporter) { 232 DEF_TEST(ImageDecoding, reporter) {
232 test_unpremul(reporter); 233 test_unpremul(reporter);
233 #ifdef SK_DEBUG 234 #ifdef SK_DEBUG
234 test_stream_life(); 235 test_stream_life();
235 test_row_proc_choice(); 236 test_row_proc_choice();
236 #endif 237 #endif
237 } 238 }
238
239 #include "TestClassDef.h"
240 DEFINE_TESTCLASS("ImageDecoding", ImageDecodingTestClass,
241 test_imageDecodingTests)
OLDNEW
« no previous file with comments | « tests/ImageCacheTest.cpp ('k') | tests/InfRectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698