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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 int m_yuvMatrixLocation; | 316 int m_yuvMatrixLocation; |
317 int m_yuvAdjLocation; | 317 int m_yuvAdjLocation; |
318 }; | 318 }; |
319 | 319 |
320 class FragmentShaderColor { | 320 class FragmentShaderColor { |
321 public: | 321 public: |
322 FragmentShaderColor(); | 322 FragmentShaderColor(); |
323 std::string getShaderString() const; | 323 std::string getShaderString() const; |
324 | 324 |
325 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni
form, int* baseUniformIndex); | 325 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni
form, int* baseUniformIndex); |
| 326 int edgeLocation() const { return -1; } |
326 int colorLocation() const { return m_colorLocation; } | 327 int colorLocation() const { return m_colorLocation; } |
327 | 328 |
328 private: | 329 private: |
329 int m_colorLocation; | 330 int m_colorLocation; |
330 }; | 331 }; |
331 | 332 |
| 333 class FragmentShaderColorAA { |
| 334 public: |
| 335 FragmentShaderColorAA(); |
| 336 std::string getShaderString() const; |
| 337 |
| 338 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni
form, int* baseUniformIndex); |
| 339 int edgeLocation() const { return m_edgeLocation; } |
| 340 int colorLocation() const { return m_colorLocation; } |
| 341 |
| 342 private: |
| 343 int m_edgeLocation; |
| 344 int m_colorLocation; |
| 345 }; |
| 346 |
332 class FragmentShaderCheckerboard { | 347 class FragmentShaderCheckerboard { |
333 public: | 348 public: |
334 FragmentShaderCheckerboard(); | 349 FragmentShaderCheckerboard(); |
335 std::string getShaderString() const; | 350 std::string getShaderString() const; |
336 | 351 |
337 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni
form, int* baseUniformIndex); | 352 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni
form, int* baseUniformIndex); |
338 int alphaLocation() const { return m_alphaLocation; } | 353 int alphaLocation() const { return m_alphaLocation; } |
339 int texTransformLocation() const { return m_texTransformLocation; } | 354 int texTransformLocation() const { return m_texTransformLocation; } |
340 int frequencyLocation() const { return m_frequencyLocation; } | 355 int frequencyLocation() const { return m_frequencyLocation; } |
341 int colorLocation() const { return m_colorLocation; } | 356 int colorLocation() const { return m_colorLocation; } |
342 private: | 357 private: |
343 int m_alphaLocation; | 358 int m_alphaLocation; |
344 int m_texTransformLocation; | 359 int m_texTransformLocation; |
345 int m_frequencyLocation; | 360 int m_frequencyLocation; |
346 int m_colorLocation; | 361 int m_colorLocation; |
347 }; | 362 }; |
348 | 363 |
349 } // namespace cc | 364 } // namespace cc |
350 | 365 |
351 #endif // CC_SHADER_H_ | 366 #endif // CC_SHADER_H_ |
OLD | NEW |