| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 header->fLocalCoordAttributeIndex = useLocalCoords ? currAttribIndex++ : -1; | 69 header->fLocalCoordAttributeIndex = useLocalCoords ? currAttribIndex++ : -1; |
| 70 | 70 |
| 71 header->fColorEffectCnt = numColorStages; | 71 header->fColorEffectCnt = numColorStages; |
| 72 header->fCoverageEffectCnt = numCoverageStages; | 72 header->fCoverageEffectCnt = numCoverageStages; |
| 73 | 73 |
| 74 bool dstRead = false; | 74 bool dstRead = false; |
| 75 bool fragPos = false; | 75 bool fragPos = false; |
| 76 bool vertexCode = false; | 76 bool vertexCode = false; |
| 77 int numStages = numColorStages + numCoverageStages; | 77 int numStages = numColorStages + numCoverageStages; |
| 78 for (int s = 0; s < numStages; ++s) { | 78 for (int s = 0; s < numStages; ++s) { |
| 79 const GrBackendEffectFactory& factory = (*stages[s]->getEffect())->getFa
ctory(); | 79 const GrBackendEffectFactory& factory = stages[s]->getEffect()->getFacto
ry(); |
| 80 GrDrawEffect drawEffect(*stages[s], useLocalCoords); | 80 GrDrawEffect drawEffect(*stages[s], useLocalCoords); |
| 81 this->effectKeys()[s] = factory.glEffectKey(drawEffect, gpu->glCaps()); | 81 this->effectKeys()[s] = factory.glEffectKey(drawEffect, gpu->glCaps()); |
| 82 if ((*stages[s]->getEffect())->willReadDstColor()) { | 82 if (stages[s]->getEffect()->willReadDstColor()) { |
| 83 dstRead = true; | 83 dstRead = true; |
| 84 } | 84 } |
| 85 if ((*stages[s]->getEffect())->willReadFragmentPosition()) { | 85 if (stages[s]->getEffect()->willReadFragmentPosition()) { |
| 86 fragPos = true; | 86 fragPos = true; |
| 87 } | 87 } |
| 88 if ((*stages[s]->getEffect())->hasVertexCode()) { | 88 if (stages[s]->getEffect()->hasVertexCode()) { |
| 89 vertexCode = true; | 89 vertexCode = true; |
| 90 } | 90 } |
| 91 } | 91 } |
| 92 | 92 |
| 93 if (dstRead) { | 93 if (dstRead) { |
| 94 header->fDstReadKey = GrGLShaderBuilder::KeyForDstRead(dstCopyTexture, g
pu->glCaps()); | 94 header->fDstReadKey = GrGLShaderBuilder::KeyForDstRead(dstCopyTexture, g
pu->glCaps()); |
| 95 } else { | 95 } else { |
| 96 header->fDstReadKey = 0; | 96 header->fDstReadKey = 0; |
| 97 } | 97 } |
| 98 if (fragPos) { | 98 if (fragPos) { |
| (...skipping 162 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 |