| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/painted_overlay_scrollbar_layer.h" | 5 #include "cc/layers/painted_overlay_scrollbar_layer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 return; | 58 return; |
| 59 | 59 |
| 60 scroll_element_id_ = element_id; | 60 scroll_element_id_ = element_id; |
| 61 SetNeedsFullTreeSync(); | 61 SetNeedsFullTreeSync(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 bool PaintedOverlayScrollbarLayer::OpacityCanAnimateOnImplThread() const { | 64 bool PaintedOverlayScrollbarLayer::OpacityCanAnimateOnImplThread() const { |
| 65 return scrollbar_->IsOverlay(); | 65 return scrollbar_->IsOverlay(); |
| 66 } | 66 } |
| 67 | 67 |
| 68 bool PaintedOverlayScrollbarLayer::AlwaysUseActiveTreeOpacity() const { | |
| 69 return true; | |
| 70 } | |
| 71 | |
| 72 ScrollbarOrientation PaintedOverlayScrollbarLayer::orientation() const { | 68 ScrollbarOrientation PaintedOverlayScrollbarLayer::orientation() const { |
| 73 return scrollbar_->Orientation(); | 69 return scrollbar_->Orientation(); |
| 74 } | 70 } |
| 75 | 71 |
| 76 void PaintedOverlayScrollbarLayer::PushPropertiesTo(LayerImpl* layer) { | 72 void PaintedOverlayScrollbarLayer::PushPropertiesTo(LayerImpl* layer) { |
| 77 Layer::PushPropertiesTo(layer); | 73 Layer::PushPropertiesTo(layer); |
| 78 | 74 |
| 79 PaintedOverlayScrollbarLayerImpl* scrollbar_layer = | 75 PaintedOverlayScrollbarLayerImpl* scrollbar_layer = |
| 80 static_cast<PaintedOverlayScrollbarLayerImpl*>(layer); | 76 static_cast<PaintedOverlayScrollbarLayerImpl*>(layer); |
| 81 | 77 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 161 |
| 166 thumb_resource_ = ScopedUIResource::Create( | 162 thumb_resource_ = ScopedUIResource::Create( |
| 167 layer_tree_host()->GetUIResourceManager(), UIResourceBitmap(skbitmap)); | 163 layer_tree_host()->GetUIResourceManager(), UIResourceBitmap(skbitmap)); |
| 168 | 164 |
| 169 SetNeedsPushProperties(); | 165 SetNeedsPushProperties(); |
| 170 | 166 |
| 171 return true; | 167 return true; |
| 172 } | 168 } |
| 173 | 169 |
| 174 } // namespace cc | 170 } // namespace cc |
| OLD | NEW |