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