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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
344 } | 344 } |
345 } | 345 } |
346 | 346 |
347 void Layer::SetBackgroundZoom(float zoom, int inset) { | 347 void Layer::SetBackgroundZoom(float zoom, int inset) { |
348 zoom_ = zoom; | 348 zoom_ = zoom; |
349 zoom_inset_ = inset; | 349 zoom_inset_ = inset; |
350 | 350 |
351 SetLayerBackgroundFilters(); | 351 SetLayerBackgroundFilters(); |
352 } | 352 } |
353 | 353 |
354 SkRegion* Layer::alpha_shape() const { | |
355 return alpha_shape_.get(); | |
danakj
2014/09/09 14:58:58
move this to the .h
jackhou1
2014/09/10 00:51:54
Done.
| |
356 } | |
357 | |
354 void Layer::SetAlphaShape(scoped_ptr<SkRegion> region) { | 358 void Layer::SetAlphaShape(scoped_ptr<SkRegion> region) { |
355 alpha_shape_ = region.Pass(); | 359 alpha_shape_ = region.Pass(); |
356 | 360 |
357 SetLayerFilters(); | 361 SetLayerFilters(); |
358 } | 362 } |
359 | 363 |
360 void Layer::SetLayerFilters() { | 364 void Layer::SetLayerFilters() { |
361 cc::FilterOperations filters; | 365 cc::FilterOperations filters; |
362 if (layer_saturation_) { | 366 if (layer_saturation_) { |
363 filters.Append(cc::FilterOperation::CreateSaturateFilter( | 367 filters.Append(cc::FilterOperation::CreateSaturateFilter( |
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1039 children_.end(), | 1043 children_.end(), |
1040 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), | 1044 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), |
1041 collection)); | 1045 collection)); |
1042 } | 1046 } |
1043 | 1047 |
1044 bool Layer::IsAnimating() const { | 1048 bool Layer::IsAnimating() const { |
1045 return animator_.get() && animator_->is_animating(); | 1049 return animator_.get() && animator_->is_animating(); |
1046 } | 1050 } |
1047 | 1051 |
1048 } // namespace ui | 1052 } // namespace ui |
OLD | NEW |