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

Side by Side Diff: src/gpu/GrGeometryProcessor.cpp

Issue 820783005: More changes to bring together path / geo procs (Closed) Base URL: https://skia.googlesource.com/skia.git@lc1
Patch Set: feedback incorporated Created 5 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 "GrGeometryProcessor.h" 8 #include "GrGeometryProcessor.h"
9 9
10 #include "GrCoordTransform.h" 10 #include "GrCoordTransform.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 combined.set(SkMatrix::kMTransY, 112 combined.set(SkMatrix::kMTransY,
113 combined[SkMatrix::kMPersp2] - combined[SkMatrix::kMTransY]); 113 combined[SkMatrix::kMPersp2] - combined[SkMatrix::kMTransY]);
114 } 114 }
115 return combined; 115 return combined;
116 } 116 }
117 117
118 void 118 void
119 GrGLPrimitiveProcessor::setupColorPassThrough(GrGLGPBuilder* pb, 119 GrGLPrimitiveProcessor::setupColorPassThrough(GrGLGPBuilder* pb,
120 GrGPInput inputType, 120 GrGPInput inputType,
121 const char* outputName, 121 const char* outputName,
122 const GrGeometryProcessor::GrAttri bute* colorAttr, 122 const GrGeometryProcessor::Attribu te* colorAttr,
123 UniformHandle* colorUniform) { 123 UniformHandle* colorUniform) {
124 GrGLGPFragmentBuilder* fs = pb->getFragmentShaderBuilder(); 124 GrGLGPFragmentBuilder* fs = pb->getFragmentShaderBuilder();
125 if (kUniform_GrGPInput == inputType) { 125 if (kUniform_GrGPInput == inputType) {
126 SkASSERT(colorUniform); 126 SkASSERT(colorUniform);
127 const char* stagedLocalVarName; 127 const char* stagedLocalVarName;
128 *colorUniform = pb->addUniform(GrGLProgramBuilder::kFragment_Visibility, 128 *colorUniform = pb->addUniform(GrGLProgramBuilder::kFragment_Visibility,
129 kVec4f_GrSLType, 129 kVec4f_GrSLType,
130 kDefault_GrSLPrecision, 130 kDefault_GrSLPrecision,
131 "Color", 131 "Color",
132 &stagedLocalVarName); 132 &stagedLocalVarName);
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 const GrGLCaps& caps) const { 523 const GrGLCaps& caps) const {
524 SkASSERT(caps.nvprSupport() != GrGLCaps::kNone_NvprSupport); 524 SkASSERT(caps.nvprSupport() != GrGLCaps::kNone_NvprSupport);
525 if (caps.nvprSupport() == GrGLCaps::kLegacy_NvprSupport) { 525 if (caps.nvprSupport() == GrGLCaps::kLegacy_NvprSupport) {
526 return SkNEW_ARGS(GrGLLegacyPathProcessor, (*this, bt, 526 return SkNEW_ARGS(GrGLLegacyPathProcessor, (*this, bt,
527 caps.maxFixedFunctionTexture Coords())); 527 caps.maxFixedFunctionTexture Coords()));
528 } else { 528 } else {
529 return SkNEW_ARGS(GrGLNormalPathProcessor, (*this, bt)); 529 return SkNEW_ARGS(GrGLNormalPathProcessor, (*this, bt));
530 } 530 }
531 } 531 }
532 532
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698