| Index: cc/layers/layer.cc
|
| diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
|
| index a1258a64d5d798a27418a5eb0c4b4697a687dd10..4aaeade757203fe7437a3619fd88e2218636e3de 100644
|
| --- a/cc/layers/layer.cc
|
| +++ b/cc/layers/layer.cc
|
| @@ -467,6 +467,9 @@ void Layer::SetBackgroundFilters(const FilterOperations& filters) {
|
|
|
| void Layer::SetOpacity(float opacity) {
|
| DCHECK(IsPropertyChangeAllowed());
|
| + DCHECK_GE(opacity, 0.f);
|
| + DCHECK_LE(opacity, 1.f);
|
| +
|
| if (opacity_ == opacity)
|
| return;
|
| // We need to force a property tree rebuild when opacity changes from 1 to a
|
| @@ -1613,6 +1616,9 @@ void Layer::OnFilterAnimated(const FilterOperations& filters) {
|
| }
|
|
|
| void Layer::OnOpacityAnimated(float opacity) {
|
| + DCHECK_GE(opacity, 0.f);
|
| + DCHECK_LE(opacity, 1.f);
|
| +
|
| if (opacity_ == opacity)
|
| return;
|
| opacity_ = opacity;
|
|
|