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

Unified Diff: cc/output/program_binding.cc

Issue 2622053005: The great shader refactor: Merge YUV shader class (Closed)
Patch Set: Rebase Created 3 years, 11 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/program_binding.h ('k') | cc/output/shader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/program_binding.cc
diff --git a/cc/output/program_binding.cc b/cc/output/program_binding.cc
index feccac2a5a4427305ee2c74a646bf426cf0cc4f5..70ed57090d3ef04f291f2766ffc28dfee283745d 100644
--- a/cc/output/program_binding.cc
+++ b/cc/output/program_binding.cc
@@ -26,7 +26,9 @@ bool ProgramKey::operator==(const ProgramKey& other) const {
has_background_color_ == other.has_background_color_ &&
mask_mode_ == other.mask_mode_ &&
mask_for_background_ == other.mask_for_background_ &&
- has_color_matrix_ == other.has_color_matrix_;
+ has_color_matrix_ == other.has_color_matrix_ &&
+ use_alpha_texture_ == other.use_alpha_texture_ &&
+ use_nv12_ == other.use_nv12_ && use_color_lut_ == other.use_color_lut_;
}
// static
@@ -103,6 +105,22 @@ ProgramKey ProgramKey::VideoStream(TexCoordPrecision precision) {
return result;
}
+// static
+ProgramKey ProgramKey::YUVVideo(TexCoordPrecision precision,
+ SamplerType sampler,
+ bool use_alpha_texture,
+ bool use_nv12,
+ bool use_color_lut) {
+ ProgramKey result;
+ result.type_ = PROGRAM_TYPE_YUV_VIDEO;
+ result.precision_ = precision;
+ result.sampler_ = sampler;
+ result.use_alpha_texture_ = use_alpha_texture;
+ result.use_nv12_ = use_nv12;
+ result.use_color_lut_ = use_color_lut;
+ return result;
+}
+
ProgramBindingBase::ProgramBindingBase()
: program_(0),
vertex_shader_id_(0),
« no previous file with comments | « cc/output/program_binding.h ('k') | cc/output/shader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698