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

Side by Side Diff: cc/layers/solid_color_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/solid_color_scrollbar_layer.h ('k') | cc/trees/layer_tree_host_impl.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 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
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
OLDNEW
« no previous file with comments | « cc/layers/solid_color_scrollbar_layer.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698