| 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_OUTPUT_SHADER_H_ | 5 #ifndef CC_OUTPUT_SHADER_H_ |
| 6 #define CC_OUTPUT_SHADER_H_ | 6 #define CC_OUTPUT_SHADER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 int yuv_matrix_location_; | 803 int yuv_matrix_location_; |
| 804 int yuv_adj_location_; | 804 int yuv_adj_location_; |
| 805 int ya_clamp_rect_location_; | 805 int ya_clamp_rect_location_; |
| 806 int uv_clamp_rect_location_; | 806 int uv_clamp_rect_location_; |
| 807 int resource_multiplier_location_; | 807 int resource_multiplier_location_; |
| 808 int resource_offset_location_; | 808 int resource_offset_location_; |
| 809 | 809 |
| 810 DISALLOW_COPY_AND_ASSIGN(FragmentShaderYUVVideo); | 810 DISALLOW_COPY_AND_ASSIGN(FragmentShaderYUVVideo); |
| 811 }; | 811 }; |
| 812 | 812 |
| 813 class FragmentShaderYVideo : public FragmentTexOpaqueBinding { |
| 814 public: |
| 815 FragmentShaderYVideo(); |
| 816 std::string GetShaderString(TexCoordPrecision precision, |
| 817 SamplerType sampler) const; |
| 818 static std::string GetShaderHead(); |
| 819 static std::string GetShaderBody(); |
| 820 |
| 821 void Init(gpu::gles2::GLES2Interface* context, |
| 822 unsigned program, |
| 823 int* base_uniform_index); |
| 824 int x_derivative_location() const { return x_derivative_location_; } |
| 825 int y_derivative_location() const { return y_derivative_location_; } |
| 826 |
| 827 private: |
| 828 int x_derivative_location_; |
| 829 int y_derivative_location_; |
| 830 |
| 831 DISALLOW_COPY_AND_ASSIGN(FragmentShaderYVideo); |
| 832 }; |
| 833 |
| 813 class FragmentShaderColor : public FragmentTexBlendMode { | 834 class FragmentShaderColor : public FragmentTexBlendMode { |
| 814 public: | 835 public: |
| 815 FragmentShaderColor(); | 836 FragmentShaderColor(); |
| 816 std::string GetShaderString( | 837 std::string GetShaderString( |
| 817 TexCoordPrecision precision, SamplerType sampler) const; | 838 TexCoordPrecision precision, SamplerType sampler) const; |
| 818 static std::string GetShaderHead(); | 839 static std::string GetShaderHead(); |
| 819 static std::string GetShaderBody(); | 840 static std::string GetShaderBody(); |
| 820 | 841 |
| 821 void Init(gpu::gles2::GLES2Interface* context, | 842 void Init(gpu::gles2::GLES2Interface* context, |
| 822 unsigned program, | 843 unsigned program, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 844 | 865 |
| 845 private: | 866 private: |
| 846 int color_location_; | 867 int color_location_; |
| 847 | 868 |
| 848 DISALLOW_COPY_AND_ASSIGN(FragmentShaderColorAA); | 869 DISALLOW_COPY_AND_ASSIGN(FragmentShaderColorAA); |
| 849 }; | 870 }; |
| 850 | 871 |
| 851 } // namespace cc | 872 } // namespace cc |
| 852 | 873 |
| 853 #endif // CC_OUTPUT_SHADER_H_ | 874 #endif // CC_OUTPUT_SHADER_H_ |
| OLD | NEW |