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

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

Issue 1109863004: Use GLSLCaps for creating processor keys and GLSL-specific programs (Closed) Base URL: https://chromium.googlesource.com/skia@master
Patch Set: Created 5 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
« no previous file with comments | « src/gpu/gl/GrGLPathProcessor.h ('k') | src/gpu/gl/GrGLProcessor.h » ('j') | 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 "GrGLPathProcessor.h" 8 #include "GrGLPathProcessor.h"
9 9
10 #include "GrPathProcessor.h" 10 #include "GrPathProcessor.h"
(...skipping 23 matching lines...) Expand all
34 } 34 }
35 35
36 // setup constant solid coverage 36 // setup constant solid coverage
37 if (kAllOnes_GrGPInput == local.fInputCoverageType) { 37 if (kAllOnes_GrGPInput == local.fInputCoverageType) {
38 fs->codeAppendf("%s = vec4(1);", args.fOutputCoverage); 38 fs->codeAppendf("%s = vec4(1);", args.fOutputCoverage);
39 } 39 }
40 } 40 }
41 41
42 void GrGLPathProcessor::GenKey(const GrPathProcessor&, 42 void GrGLPathProcessor::GenKey(const GrPathProcessor&,
43 const GrBatchTracker& bt, 43 const GrBatchTracker& bt,
44 const GrGLCaps&, 44 const GrGLSLCaps&,
45 GrProcessorKeyBuilder* b) { 45 GrProcessorKeyBuilder* b) {
46 const PathBatchTracker& local = bt.cast<PathBatchTracker>(); 46 const PathBatchTracker& local = bt.cast<PathBatchTracker>();
47 b->add32(local.fInputColorType | local.fInputCoverageType << 16); 47 b->add32(local.fInputColorType | local.fInputCoverageType << 16);
48 } 48 }
49 49
50 void GrGLPathProcessor::setData(const GrGLProgramDataManager& pdman, 50 void GrGLPathProcessor::setData(const GrGLProgramDataManager& pdman,
51 const GrPrimitiveProcessor& primProc, 51 const GrPrimitiveProcessor& primProc,
52 const GrBatchTracker& bt) { 52 const GrBatchTracker& bt) {
53 const PathBatchTracker& local = bt.cast<PathBatchTracker>(); 53 const PathBatchTracker& local = bt.cast<PathBatchTracker>();
54 if (kUniform_GrGPInput == local.fInputColorType && local.fColor != fColor) { 54 if (kUniform_GrGPInput == local.fInputColorType && local.fColor != fColor) {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 SkASSERT(transforms[t].fType == kVec2f_GrSLType || 123 SkASSERT(transforms[t].fType == kVec2f_GrSLType ||
124 transforms[t].fType == kVec3f_GrSLType); 124 transforms[t].fType == kVec3f_GrSLType);
125 unsigned components = transforms[t].fType == kVec2f_GrSLType ? 2 : 3; 125 unsigned components = transforms[t].fType == kVec2f_GrSLType ? 2 : 3;
126 glpr->setProgramPathFragmentInputTransform(programID, 126 glpr->setProgramPathFragmentInputTransform(programID,
127 fragmentInput.fLocation, 127 fragmentInput.fLocation,
128 GR_GL_OBJECT_LINEAR, 128 GR_GL_OBJECT_LINEAR,
129 components, 129 components,
130 transform); 130 transform);
131 } 131 }
132 } 132 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLPathProcessor.h ('k') | src/gpu/gl/GrGLProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698