| Index: ui/compositor/layer.cc
|
| diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
|
| index faba3dbe0392d2eb1392e62f8550d7d0e0022572..69d04e29566014235b8e064ed02cd236c00da613 100644
|
| --- a/ui/compositor/layer.cc
|
| +++ b/ui/compositor/layer.cc
|
| @@ -50,6 +50,7 @@ Layer::Layer()
|
| fills_bounds_opaquely_(true),
|
| layer_updated_externally_(false),
|
| opacity_(1.0f),
|
| + invert_(false),
|
| delegate_(NULL) {
|
| CreateWebLayer();
|
| }
|
| @@ -195,6 +196,19 @@ void Layer::SetBackgroundBlur(int blur_radius)
|
| background_blur_radius_ = blur_radius;
|
| }
|
|
|
| +void Layer::SetInvert(bool invert)
|
| +{
|
| + WebKit::WebFilterOperations filters;
|
| + if (invert) {
|
| + filters.append(WebKit::WebBasicComponentTransferFilterOperation(
|
| + WebKit::WebBasicComponentTransferFilterOperation::
|
| + BasicComponentTransferFilterTypeInvert, 1.0));
|
| + }
|
| + web_layer_.setFilters(filters);
|
| +
|
| + invert_ = invert;
|
| +}
|
| +
|
| float Layer::GetTargetOpacity() const {
|
| if (animator_.get() && animator_->IsAnimatingProperty(
|
| LayerAnimationElement::OPACITY))
|
|
|