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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 #if GR_GL_EXPERIMENTAL_GS | 95 #if GR_GL_EXPERIMENTAL_GS |
96 header->fExperimentalGS = gpu->caps()->geometryShaderSupport() && random->ne
xtBool(); | 96 header->fExperimentalGS = gpu->caps()->geometryShaderSupport() && random->ne
xtBool(); |
97 #endif | 97 #endif |
98 | 98 |
99 header->fLocalCoordAttributeIndex = useLocalCoords ? currAttribIndex++ : -1; | 99 header->fLocalCoordAttributeIndex = useLocalCoords ? currAttribIndex++ : -1; |
100 | 100 |
101 header->fColorEffectCnt = numColorStages; | 101 header->fColorEffectCnt = numColorStages; |
102 header->fCoverageEffectCnt = numCoverageStages; | 102 header->fCoverageEffectCnt = numCoverageStages; |
103 | 103 |
104 if (dstRead) { | 104 if (dstRead) { |
105 header->fDstReadKey = SkToU8(GrGLShaderBuilder::KeyForDstRead(dstCopyTex
ture, | 105 header->fDstReadKey = SkToU8(GrGLFragmentShaderBuilder::KeyForDstRead(ds
tCopyTexture, |
106 gpu->glCap
s())); | 106 gpu->glCap
s())); |
107 } else { | 107 } else { |
108 header->fDstReadKey = 0; | 108 header->fDstReadKey = 0; |
109 } | 109 } |
110 if (fragPos) { | 110 if (fragPos) { |
111 header->fFragPosKey = SkToU8(GrGLShaderBuilder::KeyForFragmentPosition(d
stRenderTarget, | 111 header->fFragPosKey = SkToU8(GrGLFragmentShaderBuilder::KeyForFragmentPo
sition(dstRenderTarget, |
112 g
pu->glCaps())); | 112 g
pu->glCaps())); |
113 } else { | 113 } else { |
114 header->fFragPosKey = 0; | 114 header->fFragPosKey = 0; |
115 } | 115 } |
116 | 116 |
117 header->fHasVertexCode = vertexCode || | 117 header->fHasVertexCode = vertexCode || |
118 useLocalCoords || | 118 useLocalCoords || |
119 kAttribute_ColorInput == header->fColorInput || | 119 kAttribute_ColorInput == header->fColorInput || |
120 kAttribute_ColorInput == header->fCoverageInput; | 120 kAttribute_ColorInput == header->fCoverageInput; |
121 | 121 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar1)); | 278 SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar1)); |
279 GrConfigConversionEffect::Create(NULL, | 279 GrConfigConversionEffect::Create(NULL, |
280 false, | 280 false, |
281 GrConfigConversionEffect::kNone_PMConversio
n, | 281 GrConfigConversionEffect::kNone_PMConversio
n, |
282 SkMatrix::I()); | 282 SkMatrix::I()); |
283 SkScalar matrix[20]; | 283 SkScalar matrix[20]; |
284 SkAutoTUnref<SkColorMatrixFilter> cmf(SkColorMatrixFilter::Create(matrix)); | 284 SkAutoTUnref<SkColorMatrixFilter> cmf(SkColorMatrixFilter::Create(matrix)); |
285 } | 285 } |
286 | 286 |
287 #endif | 287 #endif |
OLD | NEW |