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

Side by Side Diff: tests/GpuColorFilterTest.cpp

Issue 1348583002: Make skpaint->grpaint flow work for composing draws (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove unused inheriteds to satisfy clang Created 5 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
« no previous file with comments | « src/image/SkImageShader.cpp ('k') | no next file » | 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 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkColorFilter.h" 9 #include "SkColorFilter.h"
10 #include "Test.h" 10 #include "Test.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 kB = kB_GrColorComponentFlag, 55 kB = kB_GrColorComponentFlag,
56 kA = kA_GrColorComponentFlag, 56 kA = kA_GrColorComponentFlag,
57 kRGB = kRGB_GrColorComponentFlags, 57 kRGB = kRGB_GrColorComponentFlags,
58 kRGBA = kRGBA_GrColorComponentFlags 58 kRGBA = kRGBA_GrColorComponentFlags
59 }; 59 };
60 60
61 // Note: below, SkColors are non-premultiplied, where as GrColors are premul tiplied. 61 // Note: below, SkColors are non-premultiplied, where as GrColors are premul tiplied.
62 62
63 const SkColor c1 = SkColorSetARGB(200, 200, 200, 200); 63 const SkColor c1 = SkColorSetARGB(200, 200, 200, 200);
64 const SkColor c2 = SkColorSetARGB(60, 60, 60, 60); 64 const SkColor c2 = SkColorSetARGB(60, 60, 60, 60);
65 const GrColor gr_c1 = SkColor2GrColor(c1); 65 const GrColor gr_c1 = SkColorToPremulGrColor(c1);
66 const GrColor gr_c2 = SkColor2GrColor(c2); 66 const GrColor gr_c2 = SkColorToPremulGrColor(c2);
67 67
68 const GrColor gr_black = GrColorPackA4(0); 68 const GrColor gr_black = GrColorPackA4(0);
69 const GrColor gr_white = GrColorPackA4(255); 69 const GrColor gr_white = GrColorPackA4(255);
70 const GrColor gr_whiteTrans = GrColorPackA4(128); 70 const GrColor gr_whiteTrans = GrColorPackA4(128);
71 71
72 GetConstantComponentTestCase filterTests[] = { 72 GetConstantComponentTestCase filterTests[] = {
73 // A color filtered with Clear produces black. 73 // A color filtered with Clear produces black.
74 { kRGBA, gr_white, SK_ColorBLACK, SkXfermode::kClear_Mode, kRGBA, gr_bla ck }, 74 { kRGBA, gr_white, SK_ColorBLACK, SkXfermode::kClear_Mode, kRGBA, gr_bla ck },
75 { kRGBA, gr_c1, SK_ColorWHITE, SkXfermode::kClear_Mode, kRGBA, gr_bla ck }, 75 { kRGBA, gr_c1, SK_ColorWHITE, SkXfermode::kClear_Mode, kRGBA, gr_bla ck },
76 { kR, gr_white, c1, SkXfermode::kClear_Mode, kRGBA, gr_bla ck }, 76 { kR, gr_white, c1, SkXfermode::kClear_Mode, kRGBA, gr_bla ck },
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 GrContext* grContext = factory->get(glType); 123 GrContext* grContext = factory->get(glType);
124 if (nullptr == grContext) { 124 if (nullptr == grContext) {
125 continue; 125 continue;
126 } 126 }
127 127
128 test_getConstantColorComponents(reporter, grContext); 128 test_getConstantColorComponents(reporter, grContext);
129 } 129 }
130 } 130 }
131 131
132 #endif 132 #endif
OLDNEW
« no previous file with comments | « src/image/SkImageShader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698