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

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

Issue 2018833002: cc : Delete LayerImpl::opacity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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
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/scrollbar_layer_impl_base.h" 5 #include "cc/layers/scrollbar_layer_impl_base.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include "cc/trees/layer_tree_impl.h" 8 #include "cc/trees/layer_tree_impl.h"
9 #include "ui/gfx/geometry/rect_conversions.h" 9 #include "ui/gfx/geometry/rect_conversions.h"
10 10
(...skipping 14 matching lines...) Expand all
25 scroll_layer_length_(0.f), 25 scroll_layer_length_(0.f),
26 orientation_(orientation), 26 orientation_(orientation),
27 is_left_side_vertical_scrollbar_(is_left_side_vertical_scrollbar), 27 is_left_side_vertical_scrollbar_(is_left_side_vertical_scrollbar),
28 vertical_adjust_(0.f) {} 28 vertical_adjust_(0.f) {}
29 29
30 ScrollbarLayerImplBase::~ScrollbarLayerImplBase() { 30 ScrollbarLayerImplBase::~ScrollbarLayerImplBase() {
31 layer_tree_impl()->UnregisterScrollbar(this); 31 layer_tree_impl()->UnregisterScrollbar(this);
32 } 32 }
33 33
34 void ScrollbarLayerImplBase::PushPropertiesTo(LayerImpl* layer) { 34 void ScrollbarLayerImplBase::PushPropertiesTo(LayerImpl* layer) {
35 float active_opacity = layer->opacity();
36 LayerImpl::PushPropertiesTo(layer); 35 LayerImpl::PushPropertiesTo(layer);
37 layer->SetOpacity(active_opacity);
38 DCHECK(layer->ToScrollbarLayer()); 36 DCHECK(layer->ToScrollbarLayer());
39 layer->ToScrollbarLayer()->set_is_overlay_scrollbar(is_overlay_scrollbar_); 37 layer->ToScrollbarLayer()->set_is_overlay_scrollbar(is_overlay_scrollbar_);
40 layer->ToScrollbarLayer()->SetScrollLayerId(ScrollLayerId()); 38 layer->ToScrollbarLayer()->SetScrollLayerId(ScrollLayerId());
41 } 39 }
42 40
43 ScrollbarLayerImplBase* ScrollbarLayerImplBase::ToScrollbarLayer() { 41 ScrollbarLayerImplBase* ScrollbarLayerImplBase::ToScrollbarLayer() {
44 return this; 42 return this;
45 } 43 }
46 44
47 void ScrollbarLayerImplBase::SetScrollLayerId(int scroll_layer_id) { 45 void ScrollbarLayerImplBase::SetScrollLayerId(int scroll_layer_id) {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 : thumb_thickness_adjustment, 194 : thumb_thickness_adjustment,
197 thumb_offset, 195 thumb_offset,
198 thumb_thickness - thumb_thickness_adjustment, 196 thumb_thickness - thumb_thickness_adjustment,
199 thumb_length); 197 thumb_length);
200 } 198 }
201 199
202 return gfx::ToEnclosingRect(thumb_rect); 200 return gfx::ToEnclosingRect(thumb_rect);
203 } 201 }
204 202
205 } // namespace cc 203 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/render_surface_unittest.cc ('k') | cc/layers/solid_color_scrollbar_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698