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

Side by Side Diff: tests/SrcOverTest.cpp

Issue 138563004: Move macros from TestClassDef.h to Test.h (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: upload 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/SortTest.cpp ('k') | tests/StreamTest.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" 8 #include "Test.h"
9 #include "TestClassDef.h"
10 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
11 #include "SkXfermode.h" 10 #include "SkXfermode.h"
12 11
13 // our std SkAlpha255To256 12 // our std SkAlpha255To256
14 static int test_srcover0(unsigned dst, unsigned alpha) { 13 static int test_srcover0(unsigned dst, unsigned alpha) {
15 return alpha + SkAlphaMul(dst, SkAlpha255To256(255 - alpha)); 14 return alpha + SkAlphaMul(dst, SkAlpha255To256(255 - alpha));
16 } 15 }
17 16
18 // faster hack +1 17 // faster hack +1
19 static int test_srcover1(unsigned dst, unsigned alpha) { 18 static int test_srcover1(unsigned dst, unsigned alpha) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 #if 0 67 #if 0
69 // this shows where r1 (faster) differs from r2 (more exact) 68 // this shows where r1 (faster) differs from r2 (more exact)
70 if (r1 != r2) { 69 if (r1 != r2) {
71 SkDebugf("--- dst=%d i=%d r1=%d r2=%d exact=%g\n", 70 SkDebugf("--- dst=%d i=%d r1=%d r2=%d exact=%g\n",
72 dst, i, r1, r2, i + dst - dst*i/255.0f); 71 dst, i, r1, r2, i + dst - dst*i/255.0f);
73 } 72 }
74 #endif 73 #endif
75 } 74 }
76 } 75 }
77 } 76 }
OLDNEW
« no previous file with comments | « tests/SortTest.cpp ('k') | tests/StreamTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698