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

Side by Side Diff: tests/SrcOverTest.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/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"
9 #include "SkColorPriv.h" 8 #include "SkColorPriv.h"
10 #include "SkXfermode.h" 9 #include "SkXfermode.h"
10 #include "Test.h"
11 11
12 // our std SkAlpha255To256 12 // our std SkAlpha255To256
13 static int test_srcover0(unsigned dst, unsigned alpha) { 13 static int test_srcover0(unsigned dst, unsigned alpha) {
14 return alpha + SkAlphaMul(dst, SkAlpha255To256(255 - alpha)); 14 return alpha + SkAlphaMul(dst, SkAlpha255To256(255 - alpha));
15 } 15 }
16 16
17 // faster hack +1 17 // faster hack +1
18 static int test_srcover1(unsigned dst, unsigned alpha) { 18 static int test_srcover1(unsigned dst, unsigned alpha) {
19 return alpha + SkAlphaMul(dst, 256 - alpha); 19 return alpha + SkAlphaMul(dst, 256 - alpha);
20 } 20 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 #if 0 67 #if 0
68 // this shows where r1 (faster) differs from r2 (more exact) 68 // this shows where r1 (faster) differs from r2 (more exact)
69 if (r1 != r2) { 69 if (r1 != r2) {
70 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",
71 dst, i, r1, r2, i + dst - dst*i/255.0f); 71 dst, i, r1, r2, i + dst - dst*i/255.0f);
72 } 72 }
73 #endif 73 #endif
74 } 74 }
75 } 75 }
76 } 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