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 |
11 #include "gl/GrGLShaderVar.h" | 11 #include "gl/GrGLShaderVar.h" |
12 #include "gl/GrGLSL.h" | 12 #include "gl/GrGLSL.h" |
13 #include "GrAllocator.h" | 13 #include "GrAllocator.h" |
14 | 14 |
15 #include "SkTArray.h" | 15 #include "SkTArray.h" |
16 | 16 |
17 class GrGLGpu; | 17 class GrGLGpu; |
18 class SkMatrix; | 18 class SkMatrix; |
19 class GrGLProgram; | 19 class GrGLProgram; |
20 class GrGLProgramBuilder; | 20 class GrGLProgramBuilder; |
21 | 21 |
22 /** Manages the resources used by a shader program. | 22 /** Manages the resources used by a shader program. |
23 * The resources are objects the program uses to communicate with the | 23 * The resources are objects the program uses to communicate with the |
24 * application code. | 24 * application code. |
25 */ | 25 */ |
26 class GrGLProgramDataManager : public SkRefCnt { | 26 class GrGLProgramDataManager : SkNoncopyable { |
27 public: | 27 public: |
28 // Opaque handle to a uniform | 28 // Opaque handle to a uniform |
29 class ShaderResourceHandle { | 29 class ShaderResourceHandle { |
30 public: | 30 public: |
31 bool isValid() const { return -1 != fValue; } | 31 bool isValid() const { return -1 != fValue; } |
32 ShaderResourceHandle() | 32 ShaderResourceHandle() |
33 : fValue(-1) { | 33 : fValue(-1) { |
34 } | 34 } |
35 protected: | 35 protected: |
36 ShaderResourceHandle(int value) | 36 ShaderResourceHandle(int value) |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 GrSLType fType; | 104 GrSLType fType; |
105 int fArrayCount; | 105 int fArrayCount; |
106 ); | 106 ); |
107 }; | 107 }; |
108 | 108 |
109 SkDEBUGCODE(void printUnused(const Uniform&) const;) | 109 SkDEBUGCODE(void printUnused(const Uniform&) const;) |
110 | 110 |
111 SkTArray<Uniform, true> fUniforms; | 111 SkTArray<Uniform, true> fUniforms; |
112 GrGLGpu* fGpu; | 112 GrGLGpu* fGpu; |
113 | 113 |
114 typedef SkRefCnt INHERITED; | 114 typedef SkNoncopyable INHERITED; |
115 }; | 115 }; |
| 116 |
116 #endif | 117 #endif |
OLD | NEW |