Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: cc/layers/painted_overlay_scrollbar_layer.cc

Issue 2877033002: Fix cc scrollbar layer issues with initialization, and use element ids throughout. (Closed)
Patch Set: none Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/painted_overlay_scrollbar_layer.h ('k') | cc/layers/painted_scrollbar_layer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/layers/painted_overlay_scrollbar_layer.h ('k') | cc/layers/painted_scrollbar_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698