Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: cc/output/shader.h

Issue 1008493002: Increase YUV video clamping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: individual ya and uv texture size Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 767
768 void Init(gpu::gles2::GLES2Interface* context, 768 void Init(gpu::gles2::GLES2Interface* context,
769 unsigned program, 769 unsigned program,
770 int* base_uniform_index); 770 int* base_uniform_index);
771 int y_texture_location() const { return y_texture_location_; } 771 int y_texture_location() const { return y_texture_location_; }
772 int u_texture_location() const { return u_texture_location_; } 772 int u_texture_location() const { return u_texture_location_; }
773 int v_texture_location() const { return v_texture_location_; } 773 int v_texture_location() const { return v_texture_location_; }
774 int alpha_location() const { return alpha_location_; } 774 int alpha_location() const { return alpha_location_; }
775 int yuv_matrix_location() const { return yuv_matrix_location_; } 775 int yuv_matrix_location() const { return yuv_matrix_location_; }
776 int yuv_adj_location() const { return yuv_adj_location_; } 776 int yuv_adj_location() const { return yuv_adj_location_; }
777 int clamp_rect_location() const { return clamp_rect_location_; } 777 int ya_clamp_rect_location() const { return ya_clamp_rect_location_; }
778 int uv_clamp_rect_location() const { return uv_clamp_rect_location_; }
778 779
779 private: 780 private:
780 int y_texture_location_; 781 int y_texture_location_;
781 int u_texture_location_; 782 int u_texture_location_;
782 int v_texture_location_; 783 int v_texture_location_;
783 int alpha_location_; 784 int alpha_location_;
784 int yuv_matrix_location_; 785 int yuv_matrix_location_;
785 int yuv_adj_location_; 786 int yuv_adj_location_;
786 int clamp_rect_location_; 787 int ya_clamp_rect_location_;
788 int uv_clamp_rect_location_;
787 789
788 DISALLOW_COPY_AND_ASSIGN(FragmentShaderYUVVideo); 790 DISALLOW_COPY_AND_ASSIGN(FragmentShaderYUVVideo);
789 }; 791 };
790 792
791 class FragmentShaderYUVAVideo : public FragmentTexBlendMode { 793 class FragmentShaderYUVAVideo : public FragmentTexBlendMode {
792 public: 794 public:
793 FragmentShaderYUVAVideo(); 795 FragmentShaderYUVAVideo();
794 std::string GetShaderString( 796 std::string GetShaderString(
795 TexCoordPrecision precision, SamplerType sampler) const; 797 TexCoordPrecision precision, SamplerType sampler) const;
796 static std::string GetShaderHead(); 798 static std::string GetShaderHead();
797 static std::string GetShaderBody(); 799 static std::string GetShaderBody();
798 800
799 void Init(gpu::gles2::GLES2Interface* context, 801 void Init(gpu::gles2::GLES2Interface* context,
800 unsigned program, 802 unsigned program,
801 int* base_uniform_index); 803 int* base_uniform_index);
802 804
803 int y_texture_location() const { return y_texture_location_; } 805 int y_texture_location() const { return y_texture_location_; }
804 int u_texture_location() const { return u_texture_location_; } 806 int u_texture_location() const { return u_texture_location_; }
805 int v_texture_location() const { return v_texture_location_; } 807 int v_texture_location() const { return v_texture_location_; }
806 int a_texture_location() const { return a_texture_location_; } 808 int a_texture_location() const { return a_texture_location_; }
807 int alpha_location() const { return alpha_location_; } 809 int alpha_location() const { return alpha_location_; }
808 int yuv_matrix_location() const { return yuv_matrix_location_; } 810 int yuv_matrix_location() const { return yuv_matrix_location_; }
809 int yuv_adj_location() const { return yuv_adj_location_; } 811 int yuv_adj_location() const { return yuv_adj_location_; }
810 int clamp_rect_location() const { return clamp_rect_location_; } 812 int ya_clamp_rect_location() const { return ya_clamp_rect_location_; }
813 int uv_clamp_rect_location() const { return uv_clamp_rect_location_; }
811 814
812 private: 815 private:
813 int y_texture_location_; 816 int y_texture_location_;
814 int u_texture_location_; 817 int u_texture_location_;
815 int v_texture_location_; 818 int v_texture_location_;
816 int a_texture_location_; 819 int a_texture_location_;
817 int alpha_location_; 820 int alpha_location_;
818 int yuv_matrix_location_; 821 int yuv_matrix_location_;
819 int yuv_adj_location_; 822 int yuv_adj_location_;
820 int clamp_rect_location_; 823 int ya_clamp_rect_location_;
824 int uv_clamp_rect_location_;
821 825
822 DISALLOW_COPY_AND_ASSIGN(FragmentShaderYUVAVideo); 826 DISALLOW_COPY_AND_ASSIGN(FragmentShaderYUVAVideo);
823 }; 827 };
824 828
825 class FragmentShaderColor : public FragmentTexBlendMode { 829 class FragmentShaderColor : public FragmentTexBlendMode {
826 public: 830 public:
827 FragmentShaderColor(); 831 FragmentShaderColor();
828 std::string GetShaderString( 832 std::string GetShaderString(
829 TexCoordPrecision precision, SamplerType sampler) const; 833 TexCoordPrecision precision, SamplerType sampler) const;
830 static std::string GetShaderHead(); 834 static std::string GetShaderHead();
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 int tex_transform_location_; 885 int tex_transform_location_;
882 int frequency_location_; 886 int frequency_location_;
883 int color_location_; 887 int color_location_;
884 888
885 DISALLOW_COPY_AND_ASSIGN(FragmentShaderCheckerboard); 889 DISALLOW_COPY_AND_ASSIGN(FragmentShaderCheckerboard);
886 }; 890 };
887 891
888 } // namespace cc 892 } // namespace cc
889 893
890 #endif // CC_OUTPUT_SHADER_H_ 894 #endif // CC_OUTPUT_SHADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698