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

Side by Side Diff: tests/GLProgramsTest.cpp

Issue 1101663007: Make non-AA hairline stroke rects snap to pixels centers so they close. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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/gpu/gl/builders/GrGLVertexShaderBuilder.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 2011 Google Inc. 3 * Copyright 2011 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 // This is a GPU-backend specific test. It relies on static intializers to work 9 // This is a GPU-backend specific test. It relies on static intializers to work
10 10
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 pipelineBuilder->addColorProcessor(fp); 179 pipelineBuilder->addColorProcessor(fp);
180 } else { 180 } else {
181 pipelineBuilder->addCoverageProcessor(fp); 181 pipelineBuilder->addCoverageProcessor(fp);
182 } 182 }
183 ++s; 183 ++s;
184 } 184 }
185 } 185 }
186 186
187 static void set_random_state(GrPipelineBuilder* pipelineBuilder, SkRandom* rando m) { 187 static void set_random_state(GrPipelineBuilder* pipelineBuilder, SkRandom* rando m) {
188 int state = 0; 188 int state = 0;
189 for (int i = 1; i <= GrPipelineBuilder::kLast_StateBit; i <<= 1) { 189 for (int i = 1; i <= GrPipelineBuilder::kLast_Flag; i <<= 1) {
190 state |= random->nextBool() * i; 190 state |= random->nextBool() * i;
191 } 191 }
192 pipelineBuilder->enableState(state); 192 pipelineBuilder->enableState(state);
193 } 193 }
194 194
195 // right now, the only thing we seem to care about in drawState's stencil is 'do esWrite()' 195 // right now, the only thing we seem to care about in drawState's stencil is 'do esWrite()'
196 static void set_random_stencil(GrPipelineBuilder* pipelineBuilder, SkRandom* ran dom) { 196 static void set_random_stencil(GrPipelineBuilder* pipelineBuilder, SkRandom* ran dom) {
197 GR_STATIC_CONST_SAME_STENCIL(kDoesWriteStencil, 197 GR_STATIC_CONST_SAME_STENCIL(kDoesWriteStencil,
198 kReplace_StencilOp, 198 kReplace_StencilOp,
199 kReplace_StencilOp, 199 kReplace_StencilOp,
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 } 373 }
374 #endif 374 #endif
375 GrTestTarget target; 375 GrTestTarget target;
376 context->getTestTarget(&target); 376 context->getTestTarget(&target);
377 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages )); 377 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages ));
378 } 378 }
379 } 379 }
380 } 380 }
381 381
382 #endif 382 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698