OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CC_SHADER_H_ | 5 #ifndef CC_SHADER_H_ |
6 #define CC_SHADER_H_ | 6 #define CC_SHADER_H_ |
7 | 7 |
8 #include "third_party/skia/include/core/SkColorPriv.h" | 8 #include "third_party/skia/include/core/SkColorPriv.h" |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 int matrixLocation() const { return m_matrixLocation; } | 71 int matrixLocation() const { return m_matrixLocation; } |
72 int texTransformLocation() const { return m_texTransformLocation; } | 72 int texTransformLocation() const { return m_texTransformLocation; } |
73 int vertexOpacityLocation() const { return m_vertexOpacityLocation; } | 73 int vertexOpacityLocation() const { return m_vertexOpacityLocation; } |
74 | 74 |
75 private: | 75 private: |
76 int m_matrixLocation; | 76 int m_matrixLocation; |
77 int m_texTransformLocation; | 77 int m_texTransformLocation; |
78 int m_vertexOpacityLocation; | 78 int m_vertexOpacityLocation; |
79 }; | 79 }; |
80 | 80 |
| 81 class VertexShaderPosTexTransformFlip : public VertexShaderPosTexTransform { |
| 82 public: |
| 83 std::string getShaderString() const; |
| 84 }; |
| 85 |
81 class VertexShaderQuad { | 86 class VertexShaderQuad { |
82 public: | 87 public: |
83 VertexShaderQuad(); | 88 VertexShaderQuad(); |
84 | 89 |
85 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni
form, int* baseUniformIndex); | 90 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni
form, int* baseUniformIndex); |
86 std::string getShaderString() const; | 91 std::string getShaderString() const; |
87 | 92 |
88 int matrixLocation() const { return m_matrixLocation; } | 93 int matrixLocation() const { return m_matrixLocation; } |
89 int pointLocation() const { return m_pointLocation; } | 94 int pointLocation() const { return m_pointLocation; } |
90 int texScaleLocation() const { return m_texScaleLocation; } | 95 int texScaleLocation() const { return m_texScaleLocation; } |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni
form, int* baseUniformIndex); | 154 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni
form, int* baseUniformIndex); |
150 int alphaLocation() const { return -1; } | 155 int alphaLocation() const { return -1; } |
151 int edgeLocation() const { return -1; } | 156 int edgeLocation() const { return -1; } |
152 int fragmentTexTransformLocation() const { return -1; } | 157 int fragmentTexTransformLocation() const { return -1; } |
153 int samplerLocation() const { return m_samplerLocation; } | 158 int samplerLocation() const { return m_samplerLocation; } |
154 | 159 |
155 private: | 160 private: |
156 int m_samplerLocation; | 161 int m_samplerLocation; |
157 }; | 162 }; |
158 | 163 |
159 class FragmentShaderRGBATexFlipVaryingAlpha : public FragmentTexOpaqueBinding { | |
160 public: | |
161 std::string getShaderString() const; | |
162 }; | |
163 | |
164 class FragmentShaderRGBATexVaryingAlpha : public FragmentTexOpaqueBinding { | 164 class FragmentShaderRGBATexVaryingAlpha : public FragmentTexOpaqueBinding { |
165 public: | 165 public: |
166 std::string getShaderString() const; | 166 std::string getShaderString() const; |
167 }; | 167 }; |
168 | 168 |
169 class FragmentShaderRGBATexAlpha : public FragmentTexAlphaBinding { | 169 class FragmentShaderRGBATexAlpha : public FragmentTexAlphaBinding { |
170 public: | 170 public: |
171 std::string getShaderString() const; | 171 std::string getShaderString() const; |
172 }; | 172 }; |
173 | 173 |
174 class FragmentShaderRGBATexRectFlipVaryingAlpha : public FragmentTexAlphaBinding
{ | |
175 public: | |
176 std::string getShaderString() const; | |
177 }; | |
178 | |
179 class FragmentShaderRGBATexRectVaryingAlpha : public FragmentTexAlphaBinding { | 174 class FragmentShaderRGBATexRectVaryingAlpha : public FragmentTexAlphaBinding { |
180 public: | 175 public: |
181 std::string getShaderString() const; | 176 std::string getShaderString() const; |
182 }; | 177 }; |
183 | 178 |
184 class FragmentShaderRGBATexOpaque : public FragmentTexOpaqueBinding { | 179 class FragmentShaderRGBATexOpaque : public FragmentTexOpaqueBinding { |
185 public: | 180 public: |
186 std::string getShaderString() const; | 181 std::string getShaderString() const; |
187 }; | 182 }; |
188 | 183 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 private: | 342 private: |
348 int m_alphaLocation; | 343 int m_alphaLocation; |
349 int m_texTransformLocation; | 344 int m_texTransformLocation; |
350 int m_frequencyLocation; | 345 int m_frequencyLocation; |
351 int m_colorLocation; | 346 int m_colorLocation; |
352 }; | 347 }; |
353 | 348 |
354 } // namespace cc | 349 } // namespace cc |
355 | 350 |
356 #endif // CC_SHADER_H_ | 351 #endif // CC_SHADER_H_ |
OLD | NEW |