| OLD | NEW |
| 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 "GrGLFragmentShaderBuilder.h" | 8 #include "GrGLFragmentShaderBuilder.h" |
| 9 #include "GrGLProgramBuilder.h" | 9 #include "GrGLProgramBuilder.h" |
| 10 #include "gl/GrGLGpu.h" | 10 #include "gl/GrGLGpu.h" |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 } | 293 } |
| 294 } | 294 } |
| 295 | 295 |
| 296 void GrGLFragmentShaderBuilder::addVarying(GrGLVarying* v, GrSLPrecision fsPrec)
{ | 296 void GrGLFragmentShaderBuilder::addVarying(GrGLVarying* v, GrSLPrecision fsPrec)
{ |
| 297 v->fFsIn = v->fVsOut; | 297 v->fFsIn = v->fVsOut; |
| 298 if (v->fGsOut) { | 298 if (v->fGsOut) { |
| 299 v->fFsIn = v->fGsOut; | 299 v->fFsIn = v->fGsOut; |
| 300 } | 300 } |
| 301 fInputs.push_back().set(v->fType, GrGLShaderVar::kVaryingIn_TypeModifier, v-
>fFsIn, fsPrec); | 301 fInputs.push_back().set(v->fType, GrGLShaderVar::kVaryingIn_TypeModifier, v-
>fFsIn, fsPrec); |
| 302 } | 302 } |
| 303 |
| 304 void GrGLFragmentBuilder::onBeforeChildProcEmitCode() { |
| 305 fSubstageIndices.back()++; |
| 306 fSubstageIndices.push_back(0); |
| 307 fMangleString.append(this->getMangleStringThisLevel()); |
| 308 } |
| 309 |
| 310 void GrGLFragmentBuilder::onAfterChildProcEmitCode() { |
| 311 fSubstageIndices.pop_back(); |
| 312 int removeAt = fMangleString.findLastOf('_'); |
| 313 fMangleString.remove(removeAt, fMangleString.size() - removeAt); |
| 314 } |
| OLD | NEW |