OLD | NEW |
| 1 |
1 /* | 2 /* |
2 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
3 * | 4 * |
4 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 6 * found in the LICENSE file. |
6 */ | 7 */ |
7 | 8 |
8 #ifndef GrShaderObj_DEFINED | 9 #ifndef GrShaderObj_DEFINED |
9 #define GrShaderObj_DEFINED | 10 #define GrShaderObj_DEFINED |
10 | 11 |
11 #include "GrFakeRefObj.h" | 12 #include "GrFakeRefObj.h" |
12 #include "../GrGLDefines.h" | 13 #include "gl/GrGLDefines.h" |
13 | 14 |
14 //////////////////////////////////////////////////////////////////////////////// | 15 //////////////////////////////////////////////////////////////////////////////// |
15 class GrShaderObj : public GrFakeRefObj { | 16 class GrShaderObj : public GrFakeRefObj { |
16 GR_DEFINE_CREATOR(GrShaderObj); | 17 GR_DEFINE_CREATOR(GrShaderObj); |
17 | 18 |
18 public: | 19 public: |
19 GrShaderObj() | 20 GrShaderObj() |
20 : GrFakeRefObj() | 21 : GrFakeRefObj() |
21 , fType(GR_GL_VERTEX_SHADER) {} | 22 , fType(GR_GL_VERTEX_SHADER) {} |
22 | 23 |
23 void setType(GrGLenum type) { fType = type; } | 24 void setType(GrGLenum type) { fType = type; } |
24 GrGLenum getType() { return fType; } | 25 GrGLenum getType() { return fType; } |
25 | 26 |
26 void deleteAction() override; | 27 void deleteAction() override; |
27 | 28 |
28 protected: | 29 protected: |
29 private: | 30 private: |
30 GrGLenum fType; // either GR_GL_VERTEX_SHADER or GR_GL_FRAGMENT_SHADER | 31 GrGLenum fType; // either GR_GL_VERTEX_SHADER or GR_GL_FRAGMENT_SHADER |
31 | 32 |
32 typedef GrFakeRefObj INHERITED; | 33 typedef GrFakeRefObj INHERITED; |
33 }; | 34 }; |
34 | 35 |
35 #endif // GrShaderObj_DEFINED | 36 #endif // GrShaderObj_DEFINED |
OLD | NEW |