OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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 "cc/layers/layer.h" | 5 #include "cc/layers/layer.h" |
6 | 6 |
| 7 #include <algorithm> |
| 8 |
7 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
8 #include "cc/animation/animation.h" | 10 #include "cc/animation/animation.h" |
9 #include "cc/animation/animation_events.h" | 11 #include "cc/animation/animation_events.h" |
10 #include "cc/animation/layer_animation_controller.h" | 12 #include "cc/animation/layer_animation_controller.h" |
11 #include "cc/layers/layer_impl.h" | 13 #include "cc/layers/layer_impl.h" |
12 #include "cc/trees/layer_tree_host.h" | 14 #include "cc/trees/layer_tree_host.h" |
13 #include "cc/trees/layer_tree_impl.h" | 15 #include "cc/trees/layer_tree_impl.h" |
14 #include "third_party/WebKit/Source/Platform/chromium/public/WebAnimationDelegat
e.h" | 16 #include "third_party/WebKit/Source/Platform/chromium/public/WebAnimationDelegat
e.h" |
15 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerScrollClien
t.h" | 17 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerScrollClien
t.h" |
16 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" | 18 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 replica_layer_->SetLayerTreeHost(host); | 101 replica_layer_->SetLayerTreeHost(host); |
100 | 102 |
101 layer_animation_controller_->SetAnimationRegistrar( | 103 layer_animation_controller_->SetAnimationRegistrar( |
102 host ? host->animation_registrar() : NULL); | 104 host ? host->animation_registrar() : NULL); |
103 | 105 |
104 if (host && layer_animation_controller_->has_any_animation()) | 106 if (host && layer_animation_controller_->has_any_animation()) |
105 host->SetNeedsCommit(); | 107 host->SetNeedsCommit(); |
106 if (host && | 108 if (host && |
107 (!filters_.isEmpty() || !background_filters_.isEmpty() || filter_)) | 109 (!filters_.isEmpty() || !background_filters_.isEmpty() || filter_)) |
108 layer_tree_host_->set_needs_filter_context(); | 110 layer_tree_host_->set_needs_filter_context(); |
109 | |
110 } | 111 } |
111 | 112 |
112 void Layer::SetNeedsCommit() { | 113 void Layer::SetNeedsCommit() { |
113 if (ignore_set_needs_commit_) | 114 if (ignore_set_needs_commit_) |
114 return; | 115 return; |
115 if (layer_tree_host_) | 116 if (layer_tree_host_) |
116 layer_tree_host_->SetNeedsCommit(); | 117 layer_tree_host_->SetNeedsCommit(); |
117 } | 118 } |
118 | 119 |
119 void Layer::SetNeedsFullTreeSync() { | 120 void Layer::SetNeedsFullTreeSync() { |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 if (contents_opaque()) | 812 if (contents_opaque()) |
812 return visible_content_rect(); | 813 return visible_content_rect(); |
813 return Region(); | 814 return Region(); |
814 } | 815 } |
815 | 816 |
816 ScrollbarLayer* Layer::ToScrollbarLayer() { | 817 ScrollbarLayer* Layer::ToScrollbarLayer() { |
817 return NULL; | 818 return NULL; |
818 } | 819 } |
819 | 820 |
820 } // namespace cc | 821 } // namespace cc |
OLD | NEW |