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

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

Issue 1852923002: Enable sampling from DXGI NV12 formats in GLRenderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 int v_texture_location_; 787 int v_texture_location_;
788 int alpha_location_; 788 int alpha_location_;
789 int yuv_matrix_location_; 789 int yuv_matrix_location_;
790 int yuv_adj_location_; 790 int yuv_adj_location_;
791 int ya_clamp_rect_location_; 791 int ya_clamp_rect_location_;
792 int uv_clamp_rect_location_; 792 int uv_clamp_rect_location_;
793 793
794 DISALLOW_COPY_AND_ASSIGN(FragmentShaderYUVVideo); 794 DISALLOW_COPY_AND_ASSIGN(FragmentShaderYUVVideo);
795 }; 795 };
796 796
797 class FragmentShaderNV12Video : public FragmentTexBlendMode {
798 public:
799 FragmentShaderNV12Video();
800 std::string GetShaderString(TexCoordPrecision precision,
801 SamplerType sampler) const;
802 static std::string GetShaderHead();
803 static std::string GetShaderBody();
804
805 void Init(gpu::gles2::GLES2Interface* context,
806 unsigned program,
807 int* base_uniform_index);
808 int y_texture_location() const { return y_texture_location_; }
809 int uv_texture_location() const { return uv_texture_location_; }
810 int alpha_location() const { return alpha_location_; }
811 int yuv_matrix_location() const { return yuv_matrix_location_; }
812 int yuv_adj_location() const { return yuv_adj_location_; }
813 int ya_clamp_rect_location() const { return ya_clamp_rect_location_; }
814 int uv_clamp_rect_location() const { return uv_clamp_rect_location_; }
815
816 private:
817 int y_texture_location_;
818 int uv_texture_location_;
819 int alpha_location_;
820 int yuv_matrix_location_;
821 int yuv_adj_location_;
822 int ya_clamp_rect_location_;
823 int uv_clamp_rect_location_;
824
825 DISALLOW_COPY_AND_ASSIGN(FragmentShaderNV12Video);
826 };
827
797 class FragmentShaderYUVAVideo : public FragmentTexBlendMode { 828 class FragmentShaderYUVAVideo : public FragmentTexBlendMode {
798 public: 829 public:
799 FragmentShaderYUVAVideo(); 830 FragmentShaderYUVAVideo();
800 std::string GetShaderString( 831 std::string GetShaderString(
801 TexCoordPrecision precision, SamplerType sampler) const; 832 TexCoordPrecision precision, SamplerType sampler) const;
802 static std::string GetShaderHead(); 833 static std::string GetShaderHead();
803 static std::string GetShaderBody(); 834 static std::string GetShaderBody();
804 835
805 void Init(gpu::gles2::GLES2Interface* context, 836 void Init(gpu::gles2::GLES2Interface* context,
806 unsigned program, 837 unsigned program,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 895
865 private: 896 private:
866 int color_location_; 897 int color_location_;
867 898
868 DISALLOW_COPY_AND_ASSIGN(FragmentShaderColorAA); 899 DISALLOW_COPY_AND_ASSIGN(FragmentShaderColorAA);
869 }; 900 };
870 901
871 } // namespace cc 902 } // namespace cc
872 903
873 #endif // CC_OUTPUT_SHADER_H_ 904 #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