OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 GrGLFragmentProcessor_DEFINED | 8 #ifndef GrGLFragmentProcessor_DEFINED |
9 #define GrGLFragmentProcessor_DEFINED | 9 #define GrGLFragmentProcessor_DEFINED |
10 | 10 |
11 #include "GrGLProgramDataManager.h" | 11 #include "GrGLProgramDataManager.h" |
12 #include "GrGLProcessor.h" | 12 #include "GrGLProcessor.h" |
13 #include "GrTextureAccess.h" | 13 #include "GrTextureAccess.h" |
14 | 14 |
15 class GrGLFPBuilder; | 15 class GrGLFPBuilder; |
16 | 16 |
17 class GrGLFragmentProcessor { | 17 class GrGLFragmentProcessor { |
18 public: | 18 public: |
19 GrGLFragmentProcessor() {} | 19 GrGLFragmentProcessor() {} |
20 | 20 |
21 virtual ~GrGLFragmentProcessor() { | 21 virtual ~GrGLFragmentProcessor() { |
22 for (int i = 0; i < fChildProcessors.count(); ++i) { | 22 for (int i = 0; i < fChildProcessors.count(); ++i) { |
23 SkDELETE(fChildProcessors[i]); | 23 delete fChildProcessors[i]; |
24 } | 24 } |
25 } | 25 } |
26 | 26 |
27 typedef GrGLProgramDataManager::UniformHandle UniformHandle; | 27 typedef GrGLProgramDataManager::UniformHandle UniformHandle; |
28 typedef GrGLProcessor::TransformedCoordsArray TransformedCoordsArray; | 28 typedef GrGLProcessor::TransformedCoordsArray TransformedCoordsArray; |
29 typedef GrGLProcessor::TextureSamplerArray TextureSamplerArray; | 29 typedef GrGLProcessor::TextureSamplerArray TextureSamplerArray; |
30 | 30 |
31 /** Called when the program stage should insert its code into the shaders. T
he code in each | 31 /** Called when the program stage should insert its code into the shaders. T
he code in each |
32 shader will be in its own block ({}) and so locally scoped names will no
t collide across | 32 shader will be in its own block ({}) and so locally scoped names will no
t collide across |
33 stages. | 33 stages. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 virtual void onSetData(const GrGLProgramDataManager&, const GrProcessor&) {} | 92 virtual void onSetData(const GrGLProgramDataManager&, const GrProcessor&) {} |
93 | 93 |
94 private: | 94 private: |
95 SkTArray<GrGLFragmentProcessor*, true> fChildProcessors; | 95 SkTArray<GrGLFragmentProcessor*, true> fChildProcessors; |
96 | 96 |
97 friend class GrFragmentProcessor; | 97 friend class GrFragmentProcessor; |
98 typedef GrGLProcessor INHERITED; | 98 typedef GrGLProcessor INHERITED; |
99 }; | 99 }; |
100 | 100 |
101 #endif | 101 #endif |
OLD | NEW |