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

Side by Side Diff: src/gpu/glsl/GrGLSLPrimitiveProcessor.cpp

Issue 1709153002: Add more specialized fragment builders (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make MSVC happy Created 4 years, 10 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/glsl/GrGLSLPrimitiveProcessor.h ('k') | src/gpu/glsl/GrGLSLVarying.cpp » ('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 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 "GrGLSLPrimitiveProcessor.h" 8 #include "GrGLSLPrimitiveProcessor.h"
9 9
10 #include "GrCoordTransform.h" 10 #include "GrCoordTransform.h"
(...skipping 16 matching lines...) Expand all
27 combined.set(SkMatrix::kMSkewY, 27 combined.set(SkMatrix::kMSkewY,
28 combined[SkMatrix::kMPersp0] - combined[SkMatrix::kMSkewY]); 28 combined[SkMatrix::kMPersp0] - combined[SkMatrix::kMSkewY]);
29 combined.set(SkMatrix::kMScaleY, 29 combined.set(SkMatrix::kMScaleY,
30 combined[SkMatrix::kMPersp1] - combined[SkMatrix::kMScaleY]); 30 combined[SkMatrix::kMPersp1] - combined[SkMatrix::kMScaleY]);
31 combined.set(SkMatrix::kMTransY, 31 combined.set(SkMatrix::kMTransY,
32 combined[SkMatrix::kMPersp2] - combined[SkMatrix::kMTransY]); 32 combined[SkMatrix::kMPersp2] - combined[SkMatrix::kMTransY]);
33 } 33 }
34 return combined; 34 return combined;
35 } 35 }
36 36
37 void GrGLSLPrimitiveProcessor::setupUniformColor(GrGLSLFragmentBuilder* fragBuil der, 37 void GrGLSLPrimitiveProcessor::setupUniformColor(GrGLSLPPFragmentBuilder* fragBu ilder,
38 GrGLSLUniformHandler* uniformHa ndler, 38 GrGLSLUniformHandler* uniformHa ndler,
39 const char* outputName, 39 const char* outputName,
40 UniformHandle* colorUniform) { 40 UniformHandle* colorUniform) {
41 SkASSERT(colorUniform); 41 SkASSERT(colorUniform);
42 const char* stagedLocalVarName; 42 const char* stagedLocalVarName;
43 *colorUniform = uniformHandler->addUniform(kFragment_GrShaderFlag, 43 *colorUniform = uniformHandler->addUniform(kFragment_GrShaderFlag,
44 kVec4f_GrSLType, 44 kVec4f_GrSLType,
45 kDefault_GrSLPrecision, 45 kDefault_GrSLPrecision,
46 "Color", 46 "Color",
47 &stagedLocalVarName); 47 &stagedLocalVarName);
48 fragBuilder->codeAppendf("%s = %s;", outputName, stagedLocalVarName); 48 fragBuilder->codeAppendf("%s = %s;", outputName, stagedLocalVarName);
49 } 49 }
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLPrimitiveProcessor.h ('k') | src/gpu/glsl/GrGLSLVarying.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698