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

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

Issue 881963002: Clamp YUV videos to their visible size in the shader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: danakj review, build fix Created 5 years, 10 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/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 669
670 void Init(gpu::gles2::GLES2Interface* context, 670 void Init(gpu::gles2::GLES2Interface* context,
671 unsigned program, 671 unsigned program,
672 int* base_uniform_index); 672 int* base_uniform_index);
673 int y_texture_location() const { return y_texture_location_; } 673 int y_texture_location() const { return y_texture_location_; }
674 int u_texture_location() const { return u_texture_location_; } 674 int u_texture_location() const { return u_texture_location_; }
675 int v_texture_location() const { return v_texture_location_; } 675 int v_texture_location() const { return v_texture_location_; }
676 int alpha_location() const { return alpha_location_; } 676 int alpha_location() const { return alpha_location_; }
677 int yuv_matrix_location() const { return yuv_matrix_location_; } 677 int yuv_matrix_location() const { return yuv_matrix_location_; }
678 int yuv_adj_location() const { return yuv_adj_location_; } 678 int yuv_adj_location() const { return yuv_adj_location_; }
679 int clamp_rect_location() const { return clamp_rect_location_; }
679 680
680 private: 681 private:
681 int y_texture_location_; 682 int y_texture_location_;
682 int u_texture_location_; 683 int u_texture_location_;
683 int v_texture_location_; 684 int v_texture_location_;
684 int alpha_location_; 685 int alpha_location_;
685 int yuv_matrix_location_; 686 int yuv_matrix_location_;
686 int yuv_adj_location_; 687 int yuv_adj_location_;
688 int clamp_rect_location_;
687 689
688 DISALLOW_COPY_AND_ASSIGN(FragmentShaderYUVVideo); 690 DISALLOW_COPY_AND_ASSIGN(FragmentShaderYUVVideo);
689 }; 691 };
690 692
691 class FragmentShaderYUVAVideo : public FragmentTexBlendMode { 693 class FragmentShaderYUVAVideo : public FragmentTexBlendMode {
692 public: 694 public:
693 FragmentShaderYUVAVideo(); 695 FragmentShaderYUVAVideo();
694 std::string GetShaderString( 696 std::string GetShaderString(
695 TexCoordPrecision precision, SamplerType sampler) const; 697 TexCoordPrecision precision, SamplerType sampler) const;
696 698
697 void Init(gpu::gles2::GLES2Interface* context, 699 void Init(gpu::gles2::GLES2Interface* context,
698 unsigned program, 700 unsigned program,
699 int* base_uniform_index); 701 int* base_uniform_index);
700 702
701 int y_texture_location() const { return y_texture_location_; } 703 int y_texture_location() const { return y_texture_location_; }
702 int u_texture_location() const { return u_texture_location_; } 704 int u_texture_location() const { return u_texture_location_; }
703 int v_texture_location() const { return v_texture_location_; } 705 int v_texture_location() const { return v_texture_location_; }
704 int a_texture_location() const { return a_texture_location_; } 706 int a_texture_location() const { return a_texture_location_; }
705 int alpha_location() const { return alpha_location_; } 707 int alpha_location() const { return alpha_location_; }
706 int yuv_matrix_location() const { return yuv_matrix_location_; } 708 int yuv_matrix_location() const { return yuv_matrix_location_; }
707 int yuv_adj_location() const { return yuv_adj_location_; } 709 int yuv_adj_location() const { return yuv_adj_location_; }
710 int clamp_rect_location() const { return clamp_rect_location_; }
708 711
709 private: 712 private:
710 int y_texture_location_; 713 int y_texture_location_;
711 int u_texture_location_; 714 int u_texture_location_;
712 int v_texture_location_; 715 int v_texture_location_;
713 int a_texture_location_; 716 int a_texture_location_;
714 int alpha_location_; 717 int alpha_location_;
715 int yuv_matrix_location_; 718 int yuv_matrix_location_;
716 int yuv_adj_location_; 719 int yuv_adj_location_;
720 int clamp_rect_location_;
717 721
718 DISALLOW_COPY_AND_ASSIGN(FragmentShaderYUVAVideo); 722 DISALLOW_COPY_AND_ASSIGN(FragmentShaderYUVAVideo);
719 }; 723 };
720 724
721 class FragmentShaderColor : public FragmentTexBlendMode { 725 class FragmentShaderColor : public FragmentTexBlendMode {
722 public: 726 public:
723 FragmentShaderColor(); 727 FragmentShaderColor();
724 std::string GetShaderString( 728 std::string GetShaderString(
725 TexCoordPrecision precision, SamplerType sampler) const; 729 TexCoordPrecision precision, SamplerType sampler) const;
726 730
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 int tex_transform_location_; 775 int tex_transform_location_;
772 int frequency_location_; 776 int frequency_location_;
773 int color_location_; 777 int color_location_;
774 778
775 DISALLOW_COPY_AND_ASSIGN(FragmentShaderCheckerboard); 779 DISALLOW_COPY_AND_ASSIGN(FragmentShaderCheckerboard);
776 }; 780 };
777 781
778 } // namespace cc 782 } // namespace cc
779 783
780 #endif // CC_OUTPUT_SHADER_H_ 784 #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