| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 int numStages = random.nextULessThan(maxStages + 1); | 160 int numStages = random.nextULessThan(maxStages + 1); |
| 161 int numColorStages = random.nextULessThan(numStages + 1); | 161 int numColorStages = random.nextULessThan(numStages + 1); |
| 162 int numCoverageStages = numStages - numColorStages; | 162 int numCoverageStages = numStages - numColorStages; |
| 163 | 163 |
| 164 SkAutoSTMalloc<8, const GrEffectStage*> stages(numStages); | 164 SkAutoSTMalloc<8, const GrEffectStage*> stages(numStages); |
| 165 | 165 |
| 166 bool useFixedFunctionTexturing = this->shouldUseFixedFunctionTexturing()
; | 166 bool useFixedFunctionTexturing = this->shouldUseFixedFunctionTexturing()
; |
| 167 | 167 |
| 168 for (int s = 0; s < numStages;) { | 168 for (int s = 0; s < numStages;) { |
| 169 SkAutoTUnref<const GrEffectRef> effect(GrEffectTestFactory::CreateSt
age( | 169 SkAutoTUnref<const GrEffect> effect(GrEffectTestFactory::CreateStage
( |
| 170 &ran
dom, | 170 &ran
dom, |
| 171 this
->getContext(), | 171 this
->getContext(), |
| 172 *thi
s->caps(), | 172 *thi
s->caps(), |
| 173 dumm
yTextures)); | 173 dumm
yTextures)); |
| 174 SkASSERT(effect); | 174 SkASSERT(effect); |
| 175 int numAttribs = effect->numVertexAttribs(); | 175 int numAttribs = effect->numVertexAttribs(); |
| 176 | 176 |
| 177 // If adding this effect would exceed the max attrib count then gene
rate a | 177 // If adding this effect would exceed the max attrib count then gene
rate a |
| 178 // new random effect. | 178 // new random effect. |
| 179 if (currAttribIndex + numAttribs > GrDrawState::kMaxVertexAttribCnt)
{ | 179 if (currAttribIndex + numAttribs > GrDrawState::kMaxVertexAttribCnt)
{ |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar1)); | 261 SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar1)); |
| 262 GrConfigConversionEffect::Create(NULL, | 262 GrConfigConversionEffect::Create(NULL, |
| 263 false, | 263 false, |
| 264 GrConfigConversionEffect::kNone_PMConversio
n, | 264 GrConfigConversionEffect::kNone_PMConversio
n, |
| 265 SkMatrix::I()); | 265 SkMatrix::I()); |
| 266 SkScalar matrix[20]; | 266 SkScalar matrix[20]; |
| 267 SkAutoTUnref<SkColorMatrixFilter> cmf(SkColorMatrixFilter::Create(matrix)); | 267 SkAutoTUnref<SkColorMatrixFilter> cmf(SkColorMatrixFilter::Create(matrix)); |
| 268 } | 268 } |
| 269 | 269 |
| 270 #endif | 270 #endif |
| OLD | NEW |