| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 typedef GrGLProgramBuilder INHERITED; | 46 typedef GrGLProgramBuilder INHERITED; |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 | 49 |
| 50 | 50 |
| 51 ////////////////////////////////////////////////////////////////////////////// | 51 ////////////////////////////////////////////////////////////////////////////// |
| 52 | 52 |
| 53 const int GrGLProgramBuilder::kVarsPerBlock = 8; | 53 const int GrGLProgramBuilder::kVarsPerBlock = 8; |
| 54 | 54 |
| 55 GrGLProgram* GrGLProgramBuilder::CreateProgram(const DrawArgs& args, GrGLGpu* gp
u) { | 55 GrGLProgram* GrGLProgramBuilder::CreateProgram(const DrawArgs& args, GrGLGpu* gp
u) { |
| 56 GrAutoLocaleSetter als("C"); |
| 57 |
| 56 // create a builder. This will be handed off to effects so they can use it
to add | 58 // create a builder. This will be handed off to effects so they can use it
to add |
| 57 // uniforms, varyings, textures, etc | 59 // uniforms, varyings, textures, etc |
| 58 SkAutoTDelete<GrGLProgramBuilder> builder(CreateProgramBuilder(args, gpu)); | 60 SkAutoTDelete<GrGLProgramBuilder> builder(CreateProgramBuilder(args, gpu)); |
| 59 | 61 |
| 60 GrGLProgramBuilder* pb = builder.get(); | 62 GrGLProgramBuilder* pb = builder.get(); |
| 61 | 63 |
| 62 // TODO: Once all stages can handle taking a float or vec4 and correctly han
dling them we can | 64 // TODO: Once all stages can handle taking a float or vec4 and correctly han
dling them we can |
| 63 // seed correctly here | 65 // seed correctly here |
| 64 GrGLSLExpr4 inputColor; | 66 GrGLSLExpr4 inputColor; |
| 65 GrGLSLExpr4 inputCoverage; | 67 GrGLSLExpr4 inputCoverage; |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 } | 495 } |
| 494 | 496 |
| 495 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 497 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 496 | 498 |
| 497 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { | 499 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { |
| 498 int numProcs = fProcs.count(); | 500 int numProcs = fProcs.count(); |
| 499 for (int e = 0; e < numProcs; ++e) { | 501 for (int e = 0; e < numProcs; ++e) { |
| 500 SkDELETE(fProcs[e]); | 502 SkDELETE(fProcs[e]); |
| 501 } | 503 } |
| 502 } | 504 } |
| OLD | NEW |