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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/output/renderer_pixeltest.cc ('k') | cc/output/shader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/shader.h
diff --git a/cc/output/shader.h b/cc/output/shader.h
index 88b632e81b4bc9be92aa3f1aa822d711ce1535d5..836c9f57e05b28ea043cd7b1dd0b02adf990f74d 100644
--- a/cc/output/shader.h
+++ b/cc/output/shader.h
@@ -794,6 +794,37 @@ class FragmentShaderYUVVideo : public FragmentTexBlendMode {
DISALLOW_COPY_AND_ASSIGN(FragmentShaderYUVVideo);
};
+class FragmentShaderNV12Video : public FragmentTexBlendMode {
+ public:
+ FragmentShaderNV12Video();
+ std::string GetShaderString(TexCoordPrecision precision,
+ SamplerType sampler) const;
+ static std::string GetShaderHead();
+ static std::string GetShaderBody();
+
+ void Init(gpu::gles2::GLES2Interface* context,
+ unsigned program,
+ int* base_uniform_index);
+ int y_texture_location() const { return y_texture_location_; }
+ int uv_texture_location() const { return uv_texture_location_; }
+ int alpha_location() const { return alpha_location_; }
+ int yuv_matrix_location() const { return yuv_matrix_location_; }
+ int yuv_adj_location() const { return yuv_adj_location_; }
+ int ya_clamp_rect_location() const { return ya_clamp_rect_location_; }
+ int uv_clamp_rect_location() const { return uv_clamp_rect_location_; }
+
+ private:
+ int y_texture_location_;
+ int uv_texture_location_;
+ int alpha_location_;
+ int yuv_matrix_location_;
+ int yuv_adj_location_;
+ int ya_clamp_rect_location_;
+ int uv_clamp_rect_location_;
+
+ DISALLOW_COPY_AND_ASSIGN(FragmentShaderNV12Video);
+};
+
class FragmentShaderYUVAVideo : public FragmentTexBlendMode {
public:
FragmentShaderYUVAVideo();
« 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