| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/compositor/layer.h" | 5 #include "ui/compositor/layer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 filters.append(WebKit::WebFilterOperation::createSaturatingBrightnessFilter( | 331 filters.append(WebKit::WebFilterOperation::createSaturatingBrightnessFilter( |
| 332 layer_brightness_)); | 332 layer_brightness_)); |
| 333 } | 333 } |
| 334 | 334 |
| 335 cc_layer_->SetFilters(filters); | 335 cc_layer_->SetFilters(filters); |
| 336 } | 336 } |
| 337 | 337 |
| 338 void Layer::SetLayerBackgroundFilters() { | 338 void Layer::SetLayerBackgroundFilters() { |
| 339 WebKit::WebFilterOperations filters; | 339 WebKit::WebFilterOperations filters; |
| 340 if (zoom_ != 1) { | 340 if (zoom_ != 1) { |
| 341 #ifdef NEW_ZOOM_FILTER // TODO(danakj): Remove this when WebKit rolls. | |
| 342 filters.append(WebKit::WebFilterOperation::createZoomFilter(zoom_, | 341 filters.append(WebKit::WebFilterOperation::createZoomFilter(zoom_, |
| 343 zoom_inset_)); | 342 zoom_inset_)); |
| 344 #endif | |
| 345 } | 343 } |
| 346 | 344 |
| 347 if (background_blur_radius_) { | 345 if (background_blur_radius_) { |
| 348 filters.append(WebKit::WebFilterOperation::createBlurFilter( | 346 filters.append(WebKit::WebFilterOperation::createBlurFilter( |
| 349 background_blur_radius_)); | 347 background_blur_radius_)); |
| 350 } | 348 } |
| 351 | 349 |
| 352 cc_layer_->SetBackgroundFilters(filters); | 350 cc_layer_->SetBackgroundFilters(filters); |
| 353 } | 351 } |
| 354 | 352 |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 texture_layer_->SetUV(uv_top_left, uv_bottom_right); | 914 texture_layer_->SetUV(uv_top_left, uv_bottom_right); |
| 917 } else if (delegated_renderer_layer_.get()) { | 915 } else if (delegated_renderer_layer_.get()) { |
| 918 delegated_renderer_layer_->SetDisplaySize( | 916 delegated_renderer_layer_->SetDisplaySize( |
| 919 ConvertSizeToPixel(this, delegated_frame_size_in_dip_)); | 917 ConvertSizeToPixel(this, delegated_frame_size_in_dip_)); |
| 920 size.ClampToMax(delegated_frame_size_in_dip_); | 918 size.ClampToMax(delegated_frame_size_in_dip_); |
| 921 } | 919 } |
| 922 cc_layer_->SetBounds(ConvertSizeToPixel(this, size)); | 920 cc_layer_->SetBounds(ConvertSizeToPixel(this, size)); |
| 923 } | 921 } |
| 924 | 922 |
| 925 } // namespace ui | 923 } // namespace ui |
| OLD | NEW |