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

Unified Diff: cc/output/program_binding.cc

Issue 2675813002: Make LUTs independent of YUV in cc shaders (Closed)
Patch Set: compile fix 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
Index: cc/output/program_binding.cc
diff --git a/cc/output/program_binding.cc b/cc/output/program_binding.cc
index d80ef682d8d84967f7ab46d6d96cdf80c2089010..fed93b582350b356a06fa5f83d5b60dc50b61c40 100644
--- a/cc/output/program_binding.cc
+++ b/cc/output/program_binding.cc
@@ -29,7 +29,8 @@ bool ProgramKey::operator==(const ProgramKey& other) const {
has_color_matrix_ == other.has_color_matrix_ &&
yuv_alpha_texture_mode_ == other.yuv_alpha_texture_mode_ &&
uv_texture_mode_ == other.uv_texture_mode_ &&
- color_conversion_mode_ == other.color_conversion_mode_;
+ has_resource_offset_ == other.has_resource_offset_ &&
+ has_lut_ == other.has_lut_;
}
// static
@@ -111,7 +112,7 @@ ProgramKey ProgramKey::YUVVideo(TexCoordPrecision precision,
SamplerType sampler,
YUVAlphaTextureMode yuv_alpha_texture_mode,
UVTextureMode uv_texture_mode,
- ColorConversionMode color_conversion_mode) {
+ bool use_lut) {
ProgramKey result;
result.type_ = PROGRAM_TYPE_YUV_VIDEO;
result.precision_ = precision;
@@ -122,7 +123,12 @@ ProgramKey ProgramKey::YUVVideo(TexCoordPrecision precision,
result.uv_texture_mode_ = uv_texture_mode;
DCHECK(uv_texture_mode == UV_TEXTURE_MODE_UV ||
uv_texture_mode == UV_TEXTURE_MODE_U_V);
- result.color_conversion_mode_ = color_conversion_mode;
+ if (use_lut) {
+ result.has_lut_ = true;
+ result.has_resource_offset_ = true;
+ } else {
+ result.has_color_matrix_ = true;
+ }
return result;
}
« no previous file with comments | « cc/output/program_binding.h ('k') | cc/output/shader.h » ('j') | cc/output/shader.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698