| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #ifndef GrGLProgramDataManager_DEFINED | 8 #ifndef GrGLProgramDataManager_DEFINED |
| 9 #define GrGLProgramDataManager_DEFINED | 9 #define GrGLProgramDataManager_DEFINED |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 static UniformHandle CreateFromUniformIndex(int i); | 47 static UniformHandle CreateFromUniformIndex(int i); |
| 48 UniformHandle() { } | 48 UniformHandle() { } |
| 49 bool operator==(const UniformHandle& other) const { return other.fValue
== fValue; } | 49 bool operator==(const UniformHandle& other) const { return other.fValue
== fValue; } |
| 50 private: | 50 private: |
| 51 UniformHandle(int value) : ShaderResourceHandle(value) { } | 51 UniformHandle(int value) : ShaderResourceHandle(value) { } |
| 52 int toProgramDataIndex() const { SkASSERT(isValid()); return fValue; } | 52 int toProgramDataIndex() const { SkASSERT(isValid()); return fValue; } |
| 53 int toShaderBuilderIndex() const { return toProgramDataIndex(); } | 53 int toShaderBuilderIndex() const { return toProgramDataIndex(); } |
| 54 | 54 |
| 55 friend class GrGLProgramDataManager; // For accessing toProgramDataIndex
(). | 55 friend class GrGLProgramDataManager; // For accessing toProgramDataIndex
(). |
| 56 friend class GrGLProgramBuilder; // For accessing toShaderBuilderIndex()
. | 56 friend class GrGLProgramBuilder; // For accessing toShaderBuilderIndex()
. |
| 57 friend class GrGLGeometryProcessor; |
| 57 }; | 58 }; |
| 58 | 59 |
| 59 struct UniformInfo { | 60 struct UniformInfo { |
| 60 GrGLShaderVar fVariable; | 61 GrGLShaderVar fVariable; |
| 61 uint32_t fVisibility; | 62 uint32_t fVisibility; |
| 62 GrGLint fLocation; | 63 GrGLint fLocation; |
| 63 }; | 64 }; |
| 64 | 65 |
| 65 // This uses an allocator rather than array so that the GrGLShaderVars don't
move in memory | 66 // This uses an allocator rather than array so that the GrGLShaderVars don't
move in memory |
| 66 // after they are inserted. Users of GrGLShaderBuilder get refs to the vars
and ptrs to their | 67 // after they are inserted. Users of GrGLShaderBuilder get refs to the vars
and ptrs to their |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 int fArrayCount; | 105 int fArrayCount; |
| 105 ); | 106 ); |
| 106 }; | 107 }; |
| 107 | 108 |
| 108 SkTArray<Uniform, true> fUniforms; | 109 SkTArray<Uniform, true> fUniforms; |
| 109 GrGLGpu* fGpu; | 110 GrGLGpu* fGpu; |
| 110 | 111 |
| 111 typedef SkRefCnt INHERITED; | 112 typedef SkRefCnt INHERITED; |
| 112 }; | 113 }; |
| 113 #endif | 114 #endif |
| OLD | NEW |