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

Side by Side Diff: tests/GLProgramsTest.cpp

Issue 372773002: Remove use of GrEffectRef from draw state and below. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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
« 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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