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

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

Issue 2122573003: media: replace LUMINANCE_F16 by RG_88 for 9/10-bit h264 videos Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to ToT Created 4 years, 2 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
« no previous file with comments | « cc/output/renderer_pixeltest.cc ('k') | cc/output/shader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/macros.h" 10 #include "base/macros.h"
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 int mask_sampler_location_; 756 int mask_sampler_location_;
757 int alpha_location_; 757 int alpha_location_;
758 int mask_tex_coord_scale_location_; 758 int mask_tex_coord_scale_location_;
759 int mask_tex_coord_offset_location_; 759 int mask_tex_coord_offset_location_;
760 int color_matrix_location_; 760 int color_matrix_location_;
761 int color_offset_location_; 761 int color_offset_location_;
762 }; 762 };
763 763
764 class FragmentShaderYUVVideo : public FragmentTexBlendMode { 764 class FragmentShaderYUVVideo : public FragmentTexBlendMode {
765 public: 765 public:
766 enum HighbitTexture {
767 HIGHBIT_Y8 = 0, // either RED_8 or LUMINANCE_8
768 HIGHBIT_LUMINANCE_F16 = 1,
769 HIGHBIT_RG88 = 2,
770 LAST_HIGHBIT_TEXTURE = HIGHBIT_RG88
771 };
772
766 FragmentShaderYUVVideo(); 773 FragmentShaderYUVVideo();
767 std::string GetShaderString( 774 std::string GetShaderString(
768 TexCoordPrecision precision, SamplerType sampler) const; 775 TexCoordPrecision precision, SamplerType sampler) const;
769 776
770 void SetFeatures(bool use_alpha_texture, bool use_nv12, bool use_color_lut); 777 void SetFeatures(bool use_alpha_texture,
778 bool use_nv12,
779 bool use_color_lut,
780 HighbitTexture highbit_texture);
771 781
772 void Init(gpu::gles2::GLES2Interface* context, 782 void Init(gpu::gles2::GLES2Interface* context,
773 unsigned program, 783 unsigned program,
774 int* base_uniform_index); 784 int* base_uniform_index);
775 int y_texture_location() const { return y_texture_location_; } 785 int y_texture_location() const { return y_texture_location_; }
776 int u_texture_location() const { return u_texture_location_; } 786 int u_texture_location() const { return u_texture_location_; }
777 int v_texture_location() const { return v_texture_location_; } 787 int v_texture_location() const { return v_texture_location_; }
778 int uv_texture_location() const { return uv_texture_location_; } 788 int uv_texture_location() const { return uv_texture_location_; }
779 int a_texture_location() const { return a_texture_location_; } 789 int a_texture_location() const { return a_texture_location_; }
780 int lut_texture_location() const { return lut_texture_location_; } 790 int lut_texture_location() const { return lut_texture_location_; }
781 int alpha_location() const { return alpha_location_; } 791 int alpha_location() const { return alpha_location_; }
782 int yuv_matrix_location() const { return yuv_matrix_location_; } 792 int yuv_matrix_location() const { return yuv_matrix_location_; }
783 int yuv_adj_location() const { return yuv_adj_location_; } 793 int yuv_adj_location() const { return yuv_adj_location_; }
794 int ya_size_location() const { return ya_size_location_; }
795 int uv_size_location() const { return uv_size_location_; }
784 int ya_clamp_rect_location() const { return ya_clamp_rect_location_; } 796 int ya_clamp_rect_location() const { return ya_clamp_rect_location_; }
785 int uv_clamp_rect_location() const { return uv_clamp_rect_location_; } 797 int uv_clamp_rect_location() const { return uv_clamp_rect_location_; }
786 int resource_multiplier_location() const { 798 int resource_multiplier_location() const {
787 return resource_multiplier_location_; 799 return resource_multiplier_location_;
788 } 800 }
789 int resource_offset_location() const { return resource_offset_location_; } 801 int resource_offset_location() const { return resource_offset_location_; }
790 802
791 private: 803 private:
792 bool use_alpha_texture_; 804 bool use_alpha_texture_;
793 bool use_nv12_; 805 bool use_nv12_;
794 bool use_color_lut_; 806 bool use_color_lut_;
807 HighbitTexture highbit_texture_ = HIGHBIT_Y8;
795 808
796 int y_texture_location_; 809 int y_texture_location_;
797 int u_texture_location_; 810 int u_texture_location_;
798 int v_texture_location_; 811 int v_texture_location_;
799 int uv_texture_location_; 812 int uv_texture_location_;
800 int a_texture_location_; 813 int a_texture_location_;
801 int lut_texture_location_; 814 int lut_texture_location_;
802 int alpha_location_; 815 int alpha_location_;
803 int yuv_matrix_location_; 816 int yuv_matrix_location_;
804 int yuv_adj_location_; 817 int yuv_adj_location_;
818 int ya_size_location_;
819 int uv_size_location_;
805 int ya_clamp_rect_location_; 820 int ya_clamp_rect_location_;
806 int uv_clamp_rect_location_; 821 int uv_clamp_rect_location_;
807 int resource_multiplier_location_; 822 int resource_multiplier_location_;
808 int resource_offset_location_; 823 int resource_offset_location_;
809 824
810 DISALLOW_COPY_AND_ASSIGN(FragmentShaderYUVVideo); 825 DISALLOW_COPY_AND_ASSIGN(FragmentShaderYUVVideo);
811 }; 826 };
812 827
813 class FragmentShaderColor : public FragmentTexBlendMode { 828 class FragmentShaderColor : public FragmentTexBlendMode {
814 public: 829 public:
(...skipping 29 matching lines...) Expand all
844 859
845 private: 860 private:
846 int color_location_; 861 int color_location_;
847 862
848 DISALLOW_COPY_AND_ASSIGN(FragmentShaderColorAA); 863 DISALLOW_COPY_AND_ASSIGN(FragmentShaderColorAA);
849 }; 864 };
850 865
851 } // namespace cc 866 } // namespace cc
852 867
853 #endif // CC_OUTPUT_SHADER_H_ 868 #endif // CC_OUTPUT_SHADER_H_
OLDNEW
« no previous file with comments | « cc/output/renderer_pixeltest.cc ('k') | cc/output/shader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698