| 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 "GrGLProgramBuilder.h" | 8 #include "GrGLProgramBuilder.h" |
| 9 | 9 |
| 10 #include "gl/GrGLGeometryProcessor.h" | 10 #include "gl/GrGLGeometryProcessor.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 if ('\0' == prefix) { | 117 if ('\0' == prefix) { |
| 118 *out = name; | 118 *out = name; |
| 119 } else { | 119 } else { |
| 120 out->printf("%c%s", prefix, name); | 120 out->printf("%c%s", prefix, name); |
| 121 } | 121 } |
| 122 if (!fOutOfStage) { | 122 if (!fOutOfStage) { |
| 123 if (out->endsWith('_')) { | 123 if (out->endsWith('_')) { |
| 124 // Names containing "__" are reserved. | 124 // Names containing "__" are reserved. |
| 125 out->append("x"); | 125 out->append("x"); |
| 126 } | 126 } |
| 127 out->appendf("_Stage%d", fStageIndex); | 127 out->appendf("_Stage%d%s", fStageIndex, fFS.getMangleString().c_str()); |
| 128 } | 128 } |
| 129 } | 129 } |
| 130 | 130 |
| 131 GrGLProgramDataManager::UniformHandle GrGLProgramBuilder::addUniformArray( | 131 GrGLProgramDataManager::UniformHandle GrGLProgramBuilder::addUniformArray( |
| 132 uint32_t visibil
ity, | 132 uint32_t visibil
ity, |
| 133 GrSLType type, | 133 GrSLType type, |
| 134 GrSLPrecision pr
ecision, | 134 GrSLPrecision pr
ecision, |
| 135 const char* name
, | 135 const char* name
, |
| 136 int count, | 136 int count, |
| 137 const char** out
Name) { | 137 const char** out
Name) { |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 } | 498 } |
| 499 | 499 |
| 500 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 500 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 501 | 501 |
| 502 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { | 502 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { |
| 503 int numProcs = fProcs.count(); | 503 int numProcs = fProcs.count(); |
| 504 for (int e = 0; e < numProcs; ++e) { | 504 for (int e = 0; e < numProcs; ++e) { |
| 505 SkDELETE(fProcs[e]); | 505 SkDELETE(fProcs[e]); |
| 506 } | 506 } |
| 507 } | 507 } |
| OLD | NEW |