OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/solid_color_scrollbar_layer.h" | 5 #include "cc/layers/solid_color_scrollbar_layer.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "cc/layers/layer_impl.h" | 8 #include "cc/layers/layer_impl.h" |
9 #include "cc/layers/solid_color_scrollbar_layer_impl.h" | 9 #include "cc/layers/solid_color_scrollbar_layer_impl.h" |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 } | 61 } |
62 | 62 |
63 void SolidColorScrollbarLayer::PushScrollClipPropertiesTo(LayerImpl* layer) { | 63 void SolidColorScrollbarLayer::PushScrollClipPropertiesTo(LayerImpl* layer) { |
64 SolidColorScrollbarLayerImpl* scrollbar_layer = | 64 SolidColorScrollbarLayerImpl* scrollbar_layer = |
65 static_cast<SolidColorScrollbarLayerImpl*>(layer); | 65 static_cast<SolidColorScrollbarLayerImpl*>(layer); |
66 | 66 |
67 scrollbar_layer->SetScrollLayerAndClipLayerByIds(scroll_layer_id_, | 67 scrollbar_layer->SetScrollLayerAndClipLayerByIds(scroll_layer_id_, |
68 clip_layer_id_); | 68 clip_layer_id_); |
69 } | 69 } |
70 | 70 |
71 void SolidColorScrollbarLayer::SetNeedsDisplayRect(const gfx::RectF&) { | 71 void SolidColorScrollbarLayer::SetNeedsDisplayRect(const gfx::Rect& rect) { |
72 // Never needs repaint. | 72 // Never needs repaint. |
73 } | 73 } |
74 | 74 |
75 bool SolidColorScrollbarLayer::OpacityCanAnimateOnImplThread() const { | 75 bool SolidColorScrollbarLayer::OpacityCanAnimateOnImplThread() const { |
76 return true; | 76 return true; |
77 } | 77 } |
78 | 78 |
79 int SolidColorScrollbarLayer::ScrollLayerId() const { | 79 int SolidColorScrollbarLayer::ScrollLayerId() const { |
80 return scroll_layer_id_; | 80 return scroll_layer_id_; |
81 } | 81 } |
(...skipping 12 matching lines...) Expand all Loading... |
94 | 94 |
95 clip_layer_id_ = layer_id; | 95 clip_layer_id_ = layer_id; |
96 SetNeedsFullTreeSync(); | 96 SetNeedsFullTreeSync(); |
97 } | 97 } |
98 | 98 |
99 ScrollbarOrientation SolidColorScrollbarLayer::orientation() const { | 99 ScrollbarOrientation SolidColorScrollbarLayer::orientation() const { |
100 return orientation_; | 100 return orientation_; |
101 } | 101 } |
102 | 102 |
103 } // namespace cc | 103 } // namespace cc |
OLD | NEW |