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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 do { | 55 do { |
56 header->fCoverageInput = static_cast<GrGLProgramDesc::ColorInput>( | 56 header->fCoverageInput = static_cast<GrGLProgramDesc::ColorInput>( |
57 random->nextULessThan(kColorInputCnt)); | 57 random->nextULessThan(kColorInputCnt)); |
58 } while (GrDrawState::kMaxVertexAttribCnt <= currAttribIndex && | 58 } while (GrDrawState::kMaxVertexAttribCnt <= currAttribIndex && |
59 kAttribute_ColorInput == header->fCoverageInput); | 59 kAttribute_ColorInput == header->fCoverageInput); |
60 header->fCoverageAttributeIndex = (header->fCoverageInput == kAttribute_Colo
rInput) ? | 60 header->fCoverageAttributeIndex = (header->fCoverageInput == kAttribute_Colo
rInput) ? |
61 currAttribIndex++ : | 61 currAttribIndex++ : |
62 -1; | 62 -1; |
63 | 63 |
64 header->fColorFilterXfermode = static_cast<SkXfermode::Mode>( | |
65 random->nextULessThan(SkXfermode::kLastCo
effMode + 1)); | |
66 | |
67 #if GR_GL_EXPERIMENTAL_GS | 64 #if GR_GL_EXPERIMENTAL_GS |
68 header->fExperimentalGS = gpu->caps()->geometryShaderSupport() && random->ne
xtBool(); | 65 header->fExperimentalGS = gpu->caps()->geometryShaderSupport() && random->ne
xtBool(); |
69 #endif | 66 #endif |
70 | 67 |
71 header->fDiscardIfZeroCoverage = random->nextBool(); | 68 header->fDiscardIfZeroCoverage = random->nextBool(); |
72 | 69 |
73 bool useLocalCoords = random->nextBool() && currAttribIndex < GrDrawState::k
MaxVertexAttribCnt; | 70 bool useLocalCoords = random->nextBool() && currAttribIndex < GrDrawState::k
MaxVertexAttribCnt; |
74 header->fLocalCoordAttributeIndex = useLocalCoords ? currAttribIndex++ : -1; | 71 header->fLocalCoordAttributeIndex = useLocalCoords ? currAttribIndex++ : -1; |
75 | 72 |
76 header->fColorEffectCnt = numColorStages; | 73 header->fColorEffectCnt = numColorStages; |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 GrConfigConversionEffect::Create(NULL, | 247 GrConfigConversionEffect::Create(NULL, |
251 false, | 248 false, |
252 GrConfigConversionEffect::kNone_PMConversio
n, | 249 GrConfigConversionEffect::kNone_PMConversio
n, |
253 SkMatrix::I()); | 250 SkMatrix::I()); |
254 SkScalar matrix[20]; | 251 SkScalar matrix[20]; |
255 SkColorMatrixFilter cmf(matrix); | 252 SkColorMatrixFilter cmf(matrix); |
256 SkBitmapAlphaThresholdShader::Create(SkBitmap(), SkRegion(), 0x80); | 253 SkBitmapAlphaThresholdShader::Create(SkBitmap(), SkRegion(), 0x80); |
257 } | 254 } |
258 | 255 |
259 #endif | 256 #endif |
OLD | NEW |