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/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 unsigned program, | 861 unsigned program, |
862 int* base_uniform_index); | 862 int* base_uniform_index); |
863 int color_location() const { return color_location_; } | 863 int color_location() const { return color_location_; } |
864 | 864 |
865 private: | 865 private: |
866 int color_location_; | 866 int color_location_; |
867 | 867 |
868 DISALLOW_COPY_AND_ASSIGN(FragmentShaderColorAA); | 868 DISALLOW_COPY_AND_ASSIGN(FragmentShaderColorAA); |
869 }; | 869 }; |
870 | 870 |
871 class FragmentShaderCheckerboard : public FragmentTexBlendMode { | |
872 public: | |
873 FragmentShaderCheckerboard(); | |
874 std::string GetShaderString( | |
875 TexCoordPrecision precision, SamplerType sampler) const; | |
876 static std::string GetShaderHead(); | |
877 static std::string GetShaderBody(); | |
878 | |
879 void Init(gpu::gles2::GLES2Interface* context, | |
880 unsigned program, | |
881 int* base_uniform_index); | |
882 int alpha_location() const { return alpha_location_; } | |
883 int tex_transform_location() const { return tex_transform_location_; } | |
884 int frequency_location() const { return frequency_location_; } | |
885 int color_location() const { return color_location_; } | |
886 | |
887 private: | |
888 int alpha_location_; | |
889 int tex_transform_location_; | |
890 int frequency_location_; | |
891 int color_location_; | |
892 | |
893 DISALLOW_COPY_AND_ASSIGN(FragmentShaderCheckerboard); | |
894 }; | |
895 | |
896 } // namespace cc | 871 } // namespace cc |
897 | 872 |
898 #endif // CC_OUTPUT_SHADER_H_ | 873 #endif // CC_OUTPUT_SHADER_H_ |
OLD | NEW |