| 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 <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "cc/layers/layer_impl.h" | 9 #include "cc/layers/layer_impl.h" |
| 10 #include "cc/layers/solid_color_scrollbar_layer_impl.h" | 10 #include "cc/layers/solid_color_scrollbar_layer_impl.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 } | 84 } |
| 85 | 85 |
| 86 void SolidColorScrollbarLayer::SetNeedsDisplayRect(const gfx::Rect& rect) { | 86 void SolidColorScrollbarLayer::SetNeedsDisplayRect(const gfx::Rect& rect) { |
| 87 // Never needs repaint. | 87 // Never needs repaint. |
| 88 } | 88 } |
| 89 | 89 |
| 90 bool SolidColorScrollbarLayer::OpacityCanAnimateOnImplThread() const { | 90 bool SolidColorScrollbarLayer::OpacityCanAnimateOnImplThread() const { |
| 91 return true; | 91 return true; |
| 92 } | 92 } |
| 93 | 93 |
| 94 bool SolidColorScrollbarLayer::AlwaysUseActiveTreeOpacity() const { | |
| 95 return true; | |
| 96 } | |
| 97 | |
| 98 ElementId SolidColorScrollbarLayer::scroll_element_id() const { | 94 ElementId SolidColorScrollbarLayer::scroll_element_id() const { |
| 99 return solid_color_scrollbar_layer_inputs_.scroll_element_id; | 95 return solid_color_scrollbar_layer_inputs_.scroll_element_id; |
| 100 } | 96 } |
| 101 | 97 |
| 102 void SolidColorScrollbarLayer::SetScrollElementId(ElementId element_id) { | 98 void SolidColorScrollbarLayer::SetScrollElementId(ElementId element_id) { |
| 103 if (element_id == solid_color_scrollbar_layer_inputs_.scroll_element_id) | 99 if (element_id == solid_color_scrollbar_layer_inputs_.scroll_element_id) |
| 104 return; | 100 return; |
| 105 | 101 |
| 106 solid_color_scrollbar_layer_inputs_.scroll_element_id = element_id; | 102 solid_color_scrollbar_layer_inputs_.scroll_element_id = element_id; |
| 107 SetNeedsFullTreeSync(); | 103 SetNeedsFullTreeSync(); |
| 108 } | 104 } |
| 109 | 105 |
| 110 ScrollbarOrientation SolidColorScrollbarLayer::orientation() const { | 106 ScrollbarOrientation SolidColorScrollbarLayer::orientation() const { |
| 111 return solid_color_scrollbar_layer_inputs_.orientation; | 107 return solid_color_scrollbar_layer_inputs_.orientation; |
| 112 } | 108 } |
| 113 | 109 |
| 114 } // namespace cc | 110 } // namespace cc |
| OLD | NEW |