Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Side by Side Diff: tests/GLProgramsTest.cpp

Issue 14998007: Make GrGLShaderBuilder check whether GrEffect advertised that it would require the dst color or frag (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Address comments Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/gpu/gl/GrGLShaderBuilder.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 bool useLocalCoords = random->nextBool() && currAttribIndex < GrDrawState::k MaxVertexAttribCnt; 57 bool useLocalCoords = random->nextBool() && currAttribIndex < GrDrawState::k MaxVertexAttribCnt;
58 fLocalCoordAttributeIndex = useLocalCoords ? currAttribIndex++ : -1; 58 fLocalCoordAttributeIndex = useLocalCoords ? currAttribIndex++ : -1;
59 59
60 bool dstRead = false; 60 bool dstRead = false;
61 for (int s = 0; s < GrDrawState::kNumStages; ++s) { 61 for (int s = 0; s < GrDrawState::kNumStages; ++s) {
62 if (NULL != stages[s]) { 62 if (NULL != stages[s]) {
63 const GrBackendEffectFactory& factory = (*stages[s]->getEffect())->g etFactory(); 63 const GrBackendEffectFactory& factory = (*stages[s]->getEffect())->g etFactory();
64 GrDrawEffect drawEffect(*stages[s], useLocalCoords); 64 GrDrawEffect drawEffect(*stages[s], useLocalCoords);
65 fEffectKeys[s] = factory.glEffectKey(drawEffect, gpu->glCaps()); 65 fEffectKeys[s] = factory.glEffectKey(drawEffect, gpu->glCaps());
66 if ((*stages[s]->getEffect())->willReadDst()) { 66 if ((*stages[s]->getEffect())->willReadDstColor()) {
67 dstRead = true; 67 dstRead = true;
68 } 68 }
69 } 69 }
70 } 70 }
71 71
72 if (dstRead) { 72 if (dstRead) {
73 this->fDstRead = GrGLShaderBuilder::KeyForDstRead(dstTexture, gpu->glCap s()); 73 this->fDstRead = GrGLShaderBuilder::KeyForDstRead(dstTexture, gpu->glCap s());
74 } 74 }
75 75
76 CoverageOutput coverageOutput; 76 CoverageOutput coverageOutput;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 SkMagnifierImageFilter mag(SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar 1); 195 SkMagnifierImageFilter mag(SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar 1);
196 GrConfigConversionEffect::Create(NULL, 196 GrConfigConversionEffect::Create(NULL,
197 false, 197 false,
198 GrConfigConversionEffect::kNone_PMConversio n, 198 GrConfigConversionEffect::kNone_PMConversio n,
199 SkMatrix::I()); 199 SkMatrix::I());
200 SkScalar matrix[20]; 200 SkScalar matrix[20];
201 SkColorMatrixFilter cmf(matrix); 201 SkColorMatrixFilter cmf(matrix);
202 } 202 }
203 203
204 #endif 204 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLShaderBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698