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

Side by Side Diff: src/gpu/gl/GrGLProgramDesc.cpp

Issue 593803003: Fix inputCoverageIsUsed bug in GrGLProgramDesc (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | 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 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "gl/builders/GrGLProgramBuilder.h" 8 #include "gl/builders/GrGLProgramBuilder.h"
9 #include "GrGLProgramDesc.h" 9 #include "GrGLProgramDesc.h"
10 #include "GrBackendEffectFactory.h" 10 #include "GrBackendEffectFactory.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 GrGpuGL* gpu, 166 GrGpuGL* gpu,
167 const GrDeviceCoordTexture* dstCopy, 167 const GrDeviceCoordTexture* dstCopy,
168 const GrEffectStage** geometryProcessor, 168 const GrEffectStage** geometryProcessor,
169 SkTArray<const GrEffectStage*, true>* colorStages, 169 SkTArray<const GrEffectStage*, true>* colorStages,
170 SkTArray<const GrEffectStage*, true>* coverageStages , 170 SkTArray<const GrEffectStage*, true>* coverageStages ,
171 GrGLProgramDesc* desc) { 171 GrGLProgramDesc* desc) {
172 colorStages->reset(); 172 colorStages->reset();
173 coverageStages->reset(); 173 coverageStages->reset();
174 174
175 bool inputColorIsUsed = optState.inputColorIsUsed(); 175 bool inputColorIsUsed = optState.inputColorIsUsed();
176 bool inputCoverageIsUsed = optState.inputColorIsUsed(); 176 bool inputCoverageIsUsed = optState.inputCoverageIsUsed();
177 177
178 // The descriptor is used as a cache key. Thus when a field of the 178 // The descriptor is used as a cache key. Thus when a field of the
179 // descriptor will not affect program generation (because of the attribute 179 // descriptor will not affect program generation (because of the attribute
180 // bindings in use or other descriptor field settings) it should be set 180 // bindings in use or other descriptor field settings) it should be set
181 // to a canonical value to avoid duplicate programs with different keys. 181 // to a canonical value to avoid duplicate programs with different keys.
182 182
183 bool requiresColorAttrib = optState.hasColorVertexAttribute(); 183 bool requiresColorAttrib = optState.hasColorVertexAttribute();
184 bool requiresCoverageAttrib = optState.hasCoverageVertexAttribute(); 184 bool requiresCoverageAttrib = optState.hasCoverageVertexAttribute();
185 bool requiresLocalCoordAttrib = optState.requiresLocalCoordAttrib(); 185 bool requiresLocalCoordAttrib = optState.requiresLocalCoordAttrib();
186 186
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 *checksum = 0; 369 *checksum = 0;
370 *checksum = SkChecksum::Compute(reinterpret_cast<uint32_t*>(fKey.begin()), k eyLength); 370 *checksum = SkChecksum::Compute(reinterpret_cast<uint32_t*>(fKey.begin()), k eyLength);
371 } 371 }
372 372
373 GrGLProgramDesc& GrGLProgramDesc::operator= (const GrGLProgramDesc& other) { 373 GrGLProgramDesc& GrGLProgramDesc::operator= (const GrGLProgramDesc& other) {
374 size_t keyLength = other.keyLength(); 374 size_t keyLength = other.keyLength();
375 fKey.reset(keyLength); 375 fKey.reset(keyLength);
376 memcpy(fKey.begin(), other.fKey.begin(), keyLength); 376 memcpy(fKey.begin(), other.fKey.begin(), keyLength);
377 return *this; 377 return *this;
378 } 378 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698