| Index: chrome/browser/android/compositor/layer/content_layer.cc
|
| diff --git a/chrome/browser/android/compositor/layer/content_layer.cc b/chrome/browser/android/compositor/layer/content_layer.cc
|
| index 3db8a184c8b07400a0e667e51ade1d141382c52c..016c7f1db349eb6d8008054409ecc104e8c1f34a 100644
|
| --- a/chrome/browser/android/compositor/layer/content_layer.cc
|
| +++ b/chrome/browser/android/compositor/layer/content_layer.cc
|
| @@ -131,26 +131,22 @@ void ContentLayer::SetProperties(int id,
|
|
|
| // Only worry about saturation on the static layer.
|
| if (static_layer.get()) {
|
| - if (saturation != saturation_) {
|
| - saturation_ = saturation;
|
| - cc::FilterOperations filters;
|
| - if (saturation_ < 1.0f)
|
| - filters.Append(cc::FilterOperation::CreateSaturateFilter(saturation_));
|
| - static_layer->layer()->SetFilters(filters);
|
| + static_filter_operations_.Clear();
|
| + if (saturation < 1.0f) {
|
| + static_filter_operations_.Append(
|
| + cc::FilterOperation::CreateSaturateFilter(saturation));
|
| }
|
| + static_layer->layer()->SetFilters(static_filter_operations_);
|
| }
|
|
|
| // Only worry about brightness on the content layer.
|
| if (content_layer.get()) {
|
| - if (brightness != brightness_) {
|
| - brightness_ = brightness;
|
| - cc::FilterOperations filters;
|
| - if (brightness_ < 1.f) {
|
| - filters.Append(
|
| - cc::FilterOperation::CreateBrightnessFilter(brightness_));
|
| - }
|
| - content_layer->SetFilters(filters);
|
| + content_filter_operations_.Clear();
|
| + if (brightness < 1.0f) {
|
| + content_filter_operations_.Append(
|
| + cc::FilterOperation::CreateBrightnessFilter(brightness));
|
| }
|
| + content_layer->SetFilters(content_filter_operations_);
|
| }
|
| }
|
|
|
| @@ -168,8 +164,6 @@ ContentLayer::ContentLayer(TabContentManager* tab_content_manager)
|
| : layer_(cc::Layer::Create()),
|
| content_attached_(false),
|
| static_attached_(false),
|
| - saturation_(1.0f),
|
| - brightness_(1.0f),
|
| tab_content_manager_(tab_content_manager) {
|
| }
|
|
|
| @@ -226,7 +220,6 @@ void ContentLayer::SetStaticLayer(
|
| }
|
| static_layer_ = new_static_layer;
|
| static_layer_->AddSelfToParentOrReplaceAt(layer_, content_attached_ ? 1 : 0);
|
| - saturation_ = -1.0f;
|
| static_layer_->layer()->SetIsDrawable(true);
|
| static_attached_ = true;
|
| }
|
|
|