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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
363 FragmentShaderColor(); | 363 FragmentShaderColor(); |
364 std::string getShaderString() const; | 364 std::string getShaderString() const; |
365 | 365 |
366 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni form, int* baseUniformIndex); | 366 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni form, int* baseUniformIndex); |
367 int colorLocation() const { return m_colorLocation; } | 367 int colorLocation() const { return m_colorLocation; } |
368 | 368 |
369 private: | 369 private: |
370 int m_colorLocation; | 370 int m_colorLocation; |
371 }; | 371 }; |
372 | 372 |
373 class FragmentShaderYUVAVideo { | |
fgalligan1
2013/02/12 01:20:58
You could make this inherit from FragmentShaderYUV
| |
374 public: | |
375 FragmentShaderYUVAVideo(); | |
376 std::string getShaderString() const; | |
377 | |
378 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni form, int* baseUniformIndex); | |
379 | |
380 int yTextureLocation() const { return m_yTextureLocation; } | |
381 int uTextureLocation() const { return m_uTextureLocation; } | |
382 int vTextureLocation() const { return m_vTextureLocation; } | |
383 int aTextureLocation() const { return m_aTextureLocation; } | |
384 int alphaLocation() const { return m_alphaLocation; } | |
385 int yuvMatrixLocation() const { return m_yuvMatrixLocation; } | |
386 int yuvAdjLocation() const { return m_yuvAdjLocation; } | |
387 | |
388 private: | |
389 int m_yTextureLocation; | |
390 int m_uTextureLocation; | |
391 int m_vTextureLocation; | |
392 int m_aTextureLocation; | |
393 int m_alphaLocation; | |
394 int m_yuvMatrixLocation; | |
395 int m_yuvAdjLocation; | |
396 }; | |
397 | |
373 class FragmentShaderCheckerboard { | 398 class FragmentShaderCheckerboard { |
374 public: | 399 public: |
375 FragmentShaderCheckerboard(); | 400 FragmentShaderCheckerboard(); |
376 std::string getShaderString() const; | 401 std::string getShaderString() const; |
377 | 402 |
378 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni form, int* baseUniformIndex); | 403 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni form, int* baseUniformIndex); |
379 int alphaLocation() const { return m_alphaLocation; } | 404 int alphaLocation() const { return m_alphaLocation; } |
380 int texTransformLocation() const { return m_texTransformLocation; } | 405 int texTransformLocation() const { return m_texTransformLocation; } |
381 int frequencyLocation() const { return m_frequencyLocation; } | 406 int frequencyLocation() const { return m_frequencyLocation; } |
382 int colorLocation() const { return m_colorLocation; } | 407 int colorLocation() const { return m_colorLocation; } |
383 private: | 408 private: |
384 int m_alphaLocation; | 409 int m_alphaLocation; |
385 int m_texTransformLocation; | 410 int m_texTransformLocation; |
386 int m_frequencyLocation; | 411 int m_frequencyLocation; |
387 int m_colorLocation; | 412 int m_colorLocation; |
388 }; | 413 }; |
389 | 414 |
390 } // namespace cc | 415 } // namespace cc |
391 | 416 |
392 #endif // CC_SHADER_H_ | 417 #endif // CC_SHADER_H_ |
OLD | NEW |