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

Side by Side Diff: tests/GLProgramsTest.cpp

Issue 1001503002: Implement support for mixed sampled render targets (Closed) Base URL: https://skia.googlesource.com/skia.git@mix1
Patch Set: Fix build error related to isMultisamped renaming Created 5 years, 6 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/SkSurface_Gpu.cpp ('k') | tests/ResourceCacheTest.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 /* 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 } 172 }
173 173
174 static void set_random_state(GrPipelineBuilder* pipelineBuilder, SkRandom* rando m) { 174 static void set_random_state(GrPipelineBuilder* pipelineBuilder, SkRandom* rando m) {
175 int state = 0; 175 int state = 0;
176 for (int i = 1; i <= GrPipelineBuilder::kLast_Flag; i <<= 1) { 176 for (int i = 1; i <= GrPipelineBuilder::kLast_Flag; i <<= 1) {
177 state |= random->nextBool() * i; 177 state |= random->nextBool() * i;
178 } 178 }
179 179
180 // If we don't have an MSAA rendertarget then we have to disable useHWAA 180 // If we don't have an MSAA rendertarget then we have to disable useHWAA
181 if ((state | GrPipelineBuilder::kHWAntialias_Flag) && 181 if ((state | GrPipelineBuilder::kHWAntialias_Flag) &&
182 !pipelineBuilder->getRenderTarget()->isMultisampled()) { 182 !pipelineBuilder->getRenderTarget()->isUnifiedMultisampled()) {
183 state &= ~GrPipelineBuilder::kHWAntialias_Flag; 183 state &= ~GrPipelineBuilder::kHWAntialias_Flag;
184 } 184 }
185 pipelineBuilder->enableState(state); 185 pipelineBuilder->enableState(state);
186 } 186 }
187 187
188 // right now, the only thing we seem to care about in drawState's stencil is 'do esWrite()' 188 // right now, the only thing we seem to care about in drawState's stencil is 'do esWrite()'
189 static void set_random_stencil(GrPipelineBuilder* pipelineBuilder, SkRandom* ran dom) { 189 static void set_random_stencil(GrPipelineBuilder* pipelineBuilder, SkRandom* ran dom) {
190 GR_STATIC_CONST_SAME_STENCIL(kDoesWriteStencil, 190 GR_STATIC_CONST_SAME_STENCIL(kDoesWriteStencil,
191 kReplace_StencilOp, 191 kReplace_StencilOp,
192 kReplace_StencilOp, 192 kReplace_StencilOp,
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 } 316 }
317 #endif 317 #endif
318 GrTestTarget target; 318 GrTestTarget target;
319 context->getTestTarget(&target); 319 context->getTestTarget(&target);
320 REPORTER_ASSERT(reporter, target.target()->programUnitTest(context, maxStages)); 320 REPORTER_ASSERT(reporter, target.target()->programUnitTest(context, maxStages));
321 } 321 }
322 } 322 }
323 } 323 }
324 324
325 #endif 325 #endif
OLDNEW
« no previous file with comments | « src/image/SkSurface_Gpu.cpp ('k') | tests/ResourceCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698