| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 } | 63 } |
| 64 | 64 |
| 65 void SolidColorScrollbarLayer::SetNeedsDisplayRect(const gfx::Rect& rect) { | 65 void SolidColorScrollbarLayer::SetNeedsDisplayRect(const gfx::Rect& rect) { |
| 66 // Never needs repaint. | 66 // Never needs repaint. |
| 67 } | 67 } |
| 68 | 68 |
| 69 bool SolidColorScrollbarLayer::OpacityCanAnimateOnImplThread() const { | 69 bool SolidColorScrollbarLayer::OpacityCanAnimateOnImplThread() const { |
| 70 return true; | 70 return true; |
| 71 } | 71 } |
| 72 | 72 |
| 73 bool SolidColorScrollbarLayer::AlwaysUseActiveTreeOpacity() const { |
| 74 return true; |
| 75 } |
| 76 |
| 73 int SolidColorScrollbarLayer::ScrollLayerId() const { | 77 int SolidColorScrollbarLayer::ScrollLayerId() const { |
| 74 return scroll_layer_id_; | 78 return scroll_layer_id_; |
| 75 } | 79 } |
| 76 | 80 |
| 77 void SolidColorScrollbarLayer::SetScrollLayer(int layer_id) { | 81 void SolidColorScrollbarLayer::SetScrollLayer(int layer_id) { |
| 78 if (layer_id == scroll_layer_id_) | 82 if (layer_id == scroll_layer_id_) |
| 79 return; | 83 return; |
| 80 | 84 |
| 81 scroll_layer_id_ = layer_id; | 85 scroll_layer_id_ = layer_id; |
| 82 SetNeedsFullTreeSync(); | 86 SetNeedsFullTreeSync(); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 113 proto.solid_scrollbar(); | 117 proto.solid_scrollbar(); |
| 114 scroll_layer_id_ = scrollbar.scroll_layer_id(); | 118 scroll_layer_id_ = scrollbar.scroll_layer_id(); |
| 115 thumb_thickness_ = scrollbar.thumb_thickness(); | 119 thumb_thickness_ = scrollbar.thumb_thickness(); |
| 116 track_start_ = scrollbar.track_start(); | 120 track_start_ = scrollbar.track_start(); |
| 117 is_left_side_vertical_scrollbar_ = | 121 is_left_side_vertical_scrollbar_ = |
| 118 scrollbar.is_left_side_vertical_scrollbar(); | 122 scrollbar.is_left_side_vertical_scrollbar(); |
| 119 orientation_ = ScrollbarOrientationFromProto(scrollbar.orientation()); | 123 orientation_ = ScrollbarOrientationFromProto(scrollbar.orientation()); |
| 120 } | 124 } |
| 121 | 125 |
| 122 } // namespace cc | 126 } // namespace cc |
| OLD | NEW |