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

Side by Side Diff: tests/ColorTest.cpp

Issue 145313004: Cleanup: Sanitize the order of includes under tests/ (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: more two fixes Created 6 years, 11 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 | « tests/ColorFilterTest.cpp ('k') | tests/DataRefTest.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 2011 Google Inc. 2 * Copyright 2011 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 "SkColor.h" 8 #include "SkColor.h"
10 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
11 #include "SkMathPriv.h" 10 #include "SkMathPriv.h"
12 #include "SkRandom.h" 11 #include "SkRandom.h"
13 #include "SkUnPreMultiply.h" 12 #include "SkUnPreMultiply.h"
13 #include "Test.h"
14 14
15 #define GetPackedR16As32(packed) (SkGetPackedR16(dc) << (8 - SK_R16_BITS)) 15 #define GetPackedR16As32(packed) (SkGetPackedR16(dc) << (8 - SK_R16_BITS))
16 #define GetPackedG16As32(packed) (SkGetPackedG16(dc) << (8 - SK_G16_BITS)) 16 #define GetPackedG16As32(packed) (SkGetPackedG16(dc) << (8 - SK_G16_BITS))
17 #define GetPackedB16As32(packed) (SkGetPackedB16(dc) << (8 - SK_B16_BITS)) 17 #define GetPackedB16As32(packed) (SkGetPackedB16(dc) << (8 - SK_B16_BITS))
18 18
19 static inline void test_premul(skiatest::Reporter* reporter) { 19 static inline void test_premul(skiatest::Reporter* reporter) {
20 for (int a = 0; a <= 255; a++) { 20 for (int a = 0; a <= 255; a++) {
21 for (int x = 0; x <= 255; x++) { 21 for (int x = 0; x <= 255; x++) {
22 SkColor c0 = SkColorSetARGB(a, x, x, x); 22 SkColor c0 = SkColorSetARGB(a, x, x, x);
23 SkPMColor p0 = SkPreMultiplyColor(c0); 23 SkPMColor p0 = SkPreMultiplyColor(c0);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 REPORTER_ASSERT(reporter, SkFastFourByteInterp(src, dst, a255) == src); 75 REPORTER_ASSERT(reporter, SkFastFourByteInterp(src, dst, a255) == src);
76 } 76 }
77 } 77 }
78 78
79 DEF_TEST(Color, reporter) { 79 DEF_TEST(Color, reporter) {
80 test_premul(reporter); 80 test_premul(reporter);
81 //test_interp(reporter); 81 //test_interp(reporter);
82 test_fast_interp(reporter); 82 test_fast_interp(reporter);
83 //test_565blend(); 83 //test_565blend();
84 } 84 }
OLDNEW
« no previous file with comments | « tests/ColorFilterTest.cpp ('k') | tests/DataRefTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698