| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 | 8 |
| 9 #ifndef GrGLProgram_DEFINED | 9 #ifndef GrGLProgram_DEFINED |
| 10 #define GrGLProgram_DEFINED | 10 #define GrGLProgram_DEFINED |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 * This class manages a GPU program and records per-program information. | 27 * This class manages a GPU program and records per-program information. |
| 28 * We can specify the attribute locations so that they are constant | 28 * We can specify the attribute locations so that they are constant |
| 29 * across our shaders. But the driver determines the uniform locations | 29 * across our shaders. But the driver determines the uniform locations |
| 30 * at link time. We don't need to remember the sampler uniform location | 30 * at link time. We don't need to remember the sampler uniform location |
| 31 * because we will bind a texture slot to it and never change it | 31 * because we will bind a texture slot to it and never change it |
| 32 * Uniforms are program-local so we can't rely on fHWState to hold the | 32 * Uniforms are program-local so we can't rely on fHWState to hold the |
| 33 * previous uniform state after a program change. | 33 * previous uniform state after a program change. |
| 34 */ | 34 */ |
| 35 class GrGLProgram : public SkRefCnt { | 35 class GrGLProgram : public SkRefCnt { |
| 36 public: | 36 public: |
| 37 SK_DECLARE_INST_COUNT(GrGLProgram) | 37 |
| 38 | 38 |
| 39 typedef GrGLProgramBuilder::BuiltinUniformHandles BuiltinUniformHandles; | 39 typedef GrGLProgramBuilder::BuiltinUniformHandles BuiltinUniformHandles; |
| 40 | 40 |
| 41 virtual ~GrGLProgram(); | 41 virtual ~GrGLProgram(); |
| 42 | 42 |
| 43 /** | 43 /** |
| 44 * Call to abandon GL objects owned by this program. | 44 * Call to abandon GL objects owned by this program. |
| 45 */ | 45 */ |
| 46 void abandon(); | 46 void abandon(); |
| 47 | 47 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 int index, | 178 int index, |
| 179 GrGLInstalledFragProc*) override; | 179 GrGLInstalledFragProc*) override; |
| 180 virtual void onSetRenderTargetState(const GrPrimitiveProcessor&, const GrPip
eline&); | 180 virtual void onSetRenderTargetState(const GrPrimitiveProcessor&, const GrPip
eline&); |
| 181 | 181 |
| 182 friend class GrGLNvprProgramBuilder; | 182 friend class GrGLNvprProgramBuilder; |
| 183 | 183 |
| 184 typedef GrGLProgram INHERITED; | 184 typedef GrGLProgram INHERITED; |
| 185 }; | 185 }; |
| 186 | 186 |
| 187 #endif | 187 #endif |
| OLD | NEW |