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

Side by Side Diff: src/gpu/gl/builders/GrGLShaderBuilder.cpp

Issue 519473003: Use highp for gpu bezier effects (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use highp on cubics only 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 | « src/gpu/gl/builders/GrGLShaderBuilder.h ('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 * 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 "GrGLShaderBuilder.h" 8 #include "GrGLShaderBuilder.h"
9 #include "GrGLProgramBuilder.h" 9 #include "GrGLProgramBuilder.h"
10 #include "../GrGpuGL.h" 10 #include "../GrGpuGL.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 static const int kVarsPerBlock = 8; 55 static const int kVarsPerBlock = 8;
56 } 56 }
57 57
58 GrGLShaderBuilder::GrGLShaderBuilder(GrGLProgramBuilder* program) 58 GrGLShaderBuilder::GrGLShaderBuilder(GrGLProgramBuilder* program)
59 : fProgramBuilder(program) 59 : fProgramBuilder(program)
60 , fInputs(kVarsPerBlock) 60 , fInputs(kVarsPerBlock)
61 , fOutputs(kVarsPerBlock) 61 , fOutputs(kVarsPerBlock)
62 , fFeaturesAddedMask(0) { 62 , fFeaturesAddedMask(0) {
63 } 63 }
64 64
65 void GrGLShaderBuilder::declAppend(const GrGLShaderVar& var) {
66 SkString tempDecl;
67 var.appendDecl(fProgramBuilder->ctxInfo(), &tempDecl);
68 this->codeAppendf("%s;\n", tempDecl.c_str());
bsalomon 2014/08/29 14:55:06 nit: don't need the \n anymore... we pretty print
69 }
70
65 void GrGLShaderBuilder::emitFunction(GrSLType returnType, 71 void GrGLShaderBuilder::emitFunction(GrSLType returnType,
66 const char* name, 72 const char* name,
67 int argCnt, 73 int argCnt,
68 const GrGLShaderVar* args, 74 const GrGLShaderVar* args,
69 const char* body, 75 const char* body,
70 SkString* outName) { 76 SkString* outName) {
71 fFunctions.append(GrGLSLTypeString(returnType)); 77 fFunctions.append(GrGLSLTypeString(returnType));
72 fProgramBuilder->nameVariable(outName, '\0', name); 78 fProgramBuilder->nameVariable(outName, '\0', name);
73 fFunctions.appendf(" %s", outName->c_str()); 79 fFunctions.appendf(" %s", outName->c_str());
74 fFunctions.append("("); 80 fFunctions.append("(");
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 coordName, 152 coordName,
147 configComponentMask, 153 configComponentMask,
148 swizzle, 154 swizzle,
149 kVec2f_GrSLType); 155 kVec2f_GrSLType);
150 } 156 }
151 157
152 //////////////////////////////////////////////////////////////////////////////// /////////////////// 158 //////////////////////////////////////////////////////////////////////////////// ///////////////////
153 GrGLFullShaderBuilder::GrGLFullShaderBuilder(GrGLFullProgramBuilder* program) 159 GrGLFullShaderBuilder::GrGLFullShaderBuilder(GrGLFullProgramBuilder* program)
154 : INHERITED(program) 160 : INHERITED(program)
155 , fFullProgramBuilder(program) {} 161 , fFullProgramBuilder(program) {}
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLShaderBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698