| Index: ui/compositor/layer.cc
|
| diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
|
| index 206ac8e5d42fe5b0c56e17a33d23641a0e71b489..58e2d368d6d9ce7000bcc17f65afaeef9bfef787 100644
|
| --- a/ui/compositor/layer.cc
|
| +++ b/ui/compositor/layer.cc
|
| @@ -52,6 +52,7 @@ Layer::Layer()
|
| fills_bounds_opaquely_(true),
|
| layer_updated_externally_(false),
|
| opacity_(1.0f),
|
| + inverted_(false),
|
| delegate_(NULL),
|
| scale_canvas_(true),
|
| device_scale_factor_(1.0f) {
|
| @@ -66,6 +67,7 @@ Layer::Layer(LayerType type)
|
| fills_bounds_opaquely_(true),
|
| layer_updated_externally_(false),
|
| opacity_(1.0f),
|
| + inverted_(false),
|
| delegate_(NULL),
|
| scale_canvas_(true),
|
| device_scale_factor_(1.0f) {
|
| @@ -194,8 +196,7 @@ void Layer::SetOpacity(float opacity) {
|
| GetAnimator()->SetOpacity(opacity);
|
| }
|
|
|
| -void Layer::SetBackgroundBlur(int blur_radius)
|
| -{
|
| +void Layer::SetBackgroundBlur(int blur_radius) {
|
| WebKit::WebFilterOperations filters;
|
| if (blur_radius)
|
| filters.append(WebKit::WebBlurFilterOperation(blur_radius));
|
| @@ -204,6 +205,18 @@ void Layer::SetBackgroundBlur(int blur_radius)
|
| background_blur_radius_ = blur_radius;
|
| }
|
|
|
| +void Layer::SetInverted(bool inverted) {
|
| + WebKit::WebFilterOperations filters;
|
| + if (inverted) {
|
| + filters.append(WebKit::WebBasicComponentTransferFilterOperation(
|
| + WebKit::WebBasicComponentTransferFilterOperation::
|
| + BasicComponentTransferFilterTypeInvert, 1.0));
|
| + }
|
| + web_layer_.setFilters(filters);
|
| +
|
| + inverted_ = inverted;
|
| +}
|
| +
|
| float Layer::GetTargetOpacity() const {
|
| if (animator_.get() && animator_->IsAnimatingProperty(
|
| LayerAnimationElement::OPACITY))
|
|
|