OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |