| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 int currAttribIndex = GrDrawState::kAttribIndexCount; | 127 int currAttribIndex = GrDrawState::kAttribIndexCount; |
| 128 int attribIndices[2]; | 128 int attribIndices[2]; |
| 129 for (int s = 0; s < maxStages; ++s) { | 129 for (int s = 0; s < maxStages; ++s) { |
| 130 // enable the stage? | 130 // enable the stage? |
| 131 if (random.nextBool()) { | 131 if (random.nextBool()) { |
| 132 GrTexture* dummyTextures[] = {dummyTexture1.get(), dummyTexture2
.get()}; | 132 GrTexture* dummyTextures[] = {dummyTexture1.get(), dummyTexture2
.get()}; |
| 133 SkAutoTUnref<const GrEffectRef> effect(GrEffectTestFactory::Crea
teStage( | 133 SkAutoTUnref<const GrEffectRef> effect(GrEffectTestFactory::Crea
teStage( |
| 134
&random, | 134
&random, |
| 135
this->getContext(), | 135
this->getContext(), |
| 136
*this->caps(), |
| 136
dummyTextures)); | 137
dummyTextures)); |
| 137 int numAttribs = (*effect)->numVertexAttribs(); | 138 int numAttribs = (*effect)->numVertexAttribs(); |
| 138 | 139 |
| 139 // If adding this effect would cause to exceed the max attrib co
unt then generate a | 140 // If adding this effect would cause to exceed the max attrib co
unt then generate a |
| 140 // new random effect. The explanation for why this check is corr
ect is a bit | 141 // new random effect. The explanation for why this check is corr
ect is a bit |
| 141 // convoluted and this code will be removed soon. | 142 // convoluted and this code will be removed soon. |
| 142 if (currAttribIndex + numAttribs > GrDrawState::kCoverageOverrid
eAttribIndexValue) { | 143 if (currAttribIndex + numAttribs > GrDrawState::kCoverageOverrid
eAttribIndexValue) { |
| 143 --s; | 144 --s; |
| 144 continue; | 145 continue; |
| 145 } | 146 } |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 SkMagnifierImageFilter mag(SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar
1); | 202 SkMagnifierImageFilter mag(SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar
1); |
| 202 GrConfigConversionEffect::Create(NULL, | 203 GrConfigConversionEffect::Create(NULL, |
| 203 false, | 204 false, |
| 204 GrConfigConversionEffect::kNone_PMConversio
n, | 205 GrConfigConversionEffect::kNone_PMConversio
n, |
| 205 SkMatrix::I()); | 206 SkMatrix::I()); |
| 206 SkScalar matrix[20]; | 207 SkScalar matrix[20]; |
| 207 SkColorMatrixFilter cmf(matrix); | 208 SkColorMatrixFilter cmf(matrix); |
| 208 } | 209 } |
| 209 | 210 |
| 210 #endif | 211 #endif |
| OLD | NEW |