| Index: cc/output/program_binding.h
|
| diff --git a/cc/output/program_binding.h b/cc/output/program_binding.h
|
| index 4fcd7e559cbe20564c2bb31196840cc3c2a1db6a..58df9b606187108d4fbb13d9e4d8bdc64c420c44 100644
|
| --- a/cc/output/program_binding.h
|
| +++ b/cc/output/program_binding.h
|
| @@ -94,7 +94,7 @@ class CC_EXPORT ProgramKey {
|
| SamplerType sampler,
|
| YUVAlphaTextureMode yuv_alpha_texture_mode,
|
| UVTextureMode uv_texture_mode,
|
| - ColorConversionMode color_conversion_mode);
|
| + bool use_lut);
|
|
|
| bool operator==(const ProgramKey& other) const;
|
|
|
| @@ -117,11 +117,11 @@ class CC_EXPORT ProgramKey {
|
| MaskMode mask_mode_ = NO_MASK;
|
| bool mask_for_background_ = false;
|
| bool has_color_matrix_ = false;
|
| + bool has_resource_offset_ = false;
|
| + bool has_lut_ = false;
|
|
|
| YUVAlphaTextureMode yuv_alpha_texture_mode_ = YUV_NO_ALPHA_TEXTURE;
|
| UVTextureMode uv_texture_mode_ = UV_TEXTURE_MODE_NA;
|
| -
|
| - ColorConversionMode color_conversion_mode_ = COLOR_CONVERSION_MODE_NONE;
|
| };
|
|
|
| struct ProgramKeyHash {
|
| @@ -140,7 +140,8 @@ struct ProgramKeyHash {
|
| (static_cast<size_t>(key.has_color_matrix_) << 23) ^
|
| (static_cast<size_t>(key.yuv_alpha_texture_mode_) << 24) ^
|
| (static_cast<size_t>(key.uv_texture_mode_) << 25) ^
|
| - (static_cast<size_t>(key.color_conversion_mode_) << 26);
|
| + (static_cast<size_t>(key.has_lut_) << 26) ^
|
| + (static_cast<size_t>(key.has_resource_offset_) << 27);
|
| }
|
| };
|
|
|
| @@ -159,6 +160,9 @@ class Program : public ProgramBindingBase {
|
| fragment_shader_.premultiply_alpha_mode_ = key.premultiplied_alpha_;
|
| fragment_shader_.mask_mode_ = key.mask_mode_;
|
| fragment_shader_.mask_for_background_ = key.mask_for_background_;
|
| + fragment_shader_.has_color_matrix_ = key.has_color_matrix_;
|
| + fragment_shader_.has_resource_offset_ = key.has_resource_offset_;
|
| + fragment_shader_.has_lut_ = key.has_lut_;
|
|
|
| switch (key.type_) {
|
| case PROGRAM_TYPE_DEBUG_BORDER:
|
| @@ -266,10 +270,6 @@ class Program : public ProgramBindingBase {
|
| return fragment_shader_.lut_texture_location_;
|
| }
|
| int lut_size_location() const { return fragment_shader_.lut_size_location_; }
|
| - int yuv_matrix_location() const {
|
| - return fragment_shader_.yuv_matrix_location_;
|
| - }
|
| - int yuv_adj_location() const { return fragment_shader_.yuv_adj_location_; }
|
| int ya_clamp_rect_location() const {
|
| return fragment_shader_.ya_clamp_rect_location_;
|
| }
|
| @@ -365,7 +365,6 @@ class Program : public ProgramBindingBase {
|
| // Initialize fragment program.
|
| fragment_shader_.frag_color_mode_ = FRAG_COLOR_MODE_APPLY_BLEND_MODE;
|
| fragment_shader_.has_uniform_alpha_ = true;
|
| - fragment_shader_.has_color_matrix_ = key.has_color_matrix_;
|
| if (key.mask_mode_ == HAS_MASK) {
|
| fragment_shader_.ignore_sampler_type_ = true;
|
| } else {
|
| @@ -389,7 +388,7 @@ class Program : public ProgramBindingBase {
|
| fragment_shader_.has_uniform_alpha_ = true;
|
| fragment_shader_.yuv_alpha_texture_mode_ = key.yuv_alpha_texture_mode_;
|
| fragment_shader_.uv_texture_mode_ = key.uv_texture_mode_;
|
| - fragment_shader_.color_conversion_mode_ = key.color_conversion_mode_;
|
| + DCHECK(key.has_lut_ || key.has_color_matrix_);
|
| }
|
|
|
| void InitializeInternal(ContextProvider* context_provider) {
|
|
|