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 18 matching lines...) Expand all Loading... |
29 fColorInput = random->nextULessThan(kColorInputCnt); | 29 fColorInput = random->nextULessThan(kColorInputCnt); |
30 fCoverageInput = random->nextULessThan(kColorInputCnt); | 30 fCoverageInput = random->nextULessThan(kColorInputCnt); |
31 | 31 |
32 fColorFilterXfermode = random->nextULessThan(SkXfermode::kCoeffModesCnt); | 32 fColorFilterXfermode = random->nextULessThan(SkXfermode::kCoeffModesCnt); |
33 | 33 |
34 fFirstCoverageStage = random->nextULessThan(GrDrawState::kNumStages); | 34 fFirstCoverageStage = random->nextULessThan(GrDrawState::kNumStages); |
35 | 35 |
36 fAttribBindings |= random->nextBool() ? GrDrawState::kCoverage_AttribBinding
sBit : 0; | 36 fAttribBindings |= random->nextBool() ? GrDrawState::kCoverage_AttribBinding
sBit : 0; |
37 | 37 |
38 #if GR_GL_EXPERIMENTAL_GS | 38 #if GR_GL_EXPERIMENTAL_GS |
39 fExperimentalGS = gpu->getCaps().geometryShaderSupport() && random->nextBool
(); | 39 fExperimentalGS = gpu->caps()->geometryShaderSupport() && random->nextBool()
; |
40 #endif | 40 #endif |
41 | 41 |
42 bool edgeAA = random->nextBool(); | 42 bool edgeAA = random->nextBool(); |
43 if (edgeAA) { | 43 if (edgeAA) { |
44 fAttribBindings |= GrDrawState::kEdge_AttribBindingsBit; | 44 fAttribBindings |= GrDrawState::kEdge_AttribBindingsBit; |
45 if (gpu->getCaps().shaderDerivativeSupport()) { | 45 if (gpu->caps()->shaderDerivativeSupport()) { |
46 fVertexEdgeType = (GrDrawState::VertexEdgeType) | 46 fVertexEdgeType = (GrDrawState::VertexEdgeType) |
47 random->nextULessThan(GrDrawState::kVertexEdgeType
Cnt); | 47 random->nextULessThan(GrDrawState::kVertexEdgeType
Cnt); |
48 fDiscardIfOutsideEdge = random->nextBool(); | 48 fDiscardIfOutsideEdge = random->nextBool(); |
49 } else { | 49 } else { |
50 fVertexEdgeType = GrDrawState::kHairLine_EdgeType; | 50 fVertexEdgeType = GrDrawState::kHairLine_EdgeType; |
51 fDiscardIfOutsideEdge = false; | 51 fDiscardIfOutsideEdge = false; |
52 } | 52 } |
53 } | 53 } |
54 | 54 |
55 if (gpu->getCaps().dualSourceBlendingSupport()) { | 55 if (gpu->caps()->dualSourceBlendingSupport()) { |
56 fDualSrcOutput = random->nextULessThan(kDualSrcOutputCnt); | 56 fDualSrcOutput = random->nextULessThan(kDualSrcOutputCnt); |
57 } else { | 57 } else { |
58 fDualSrcOutput = kNone_DualSrcOutput; | 58 fDualSrcOutput = kNone_DualSrcOutput; |
59 } | 59 } |
60 | 60 |
61 // use separate tex coords? | 61 // use separate tex coords? |
62 if (random->nextBool()) { | 62 if (random->nextBool()) { |
63 fAttribBindings |= GrDrawState::kLocalCoords_AttribBindingsBit; | 63 fAttribBindings |= GrDrawState::kLocalCoords_AttribBindingsBit; |
64 } | 64 } |
65 | 65 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 SkMagnifierImageFilter mag(SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar
1); | 201 SkMagnifierImageFilter mag(SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar
1); |
202 GrConfigConversionEffect::Create(NULL, | 202 GrConfigConversionEffect::Create(NULL, |
203 false, | 203 false, |
204 GrConfigConversionEffect::kNone_PMConversio
n, | 204 GrConfigConversionEffect::kNone_PMConversio
n, |
205 SkMatrix::I()); | 205 SkMatrix::I()); |
206 SkScalar matrix[20]; | 206 SkScalar matrix[20]; |
207 SkColorMatrixFilter cmf(matrix); | 207 SkColorMatrixFilter cmf(matrix); |
208 } | 208 } |
209 | 209 |
210 #endif | 210 #endif |
OLD | NEW |