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

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

Issue 1991523002: cc : Track ids for which active opacity always wins on property trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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_scrollbar_layer.h ('k') | cc/layers/scrollbar_layer_impl_base.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/painted_scrollbar_layer.h" 5 #include "cc/layers/painted_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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return; 63 return;
64 64
65 scroll_layer_id_ = layer_id; 65 scroll_layer_id_ = layer_id;
66 SetNeedsFullTreeSync(); 66 SetNeedsFullTreeSync();
67 } 67 }
68 68
69 bool PaintedScrollbarLayer::OpacityCanAnimateOnImplThread() const { 69 bool PaintedScrollbarLayer::OpacityCanAnimateOnImplThread() const {
70 return scrollbar_->IsOverlay(); 70 return scrollbar_->IsOverlay();
71 } 71 }
72 72
73 bool PaintedScrollbarLayer::AlwaysUseActiveTreeOpacity() const {
74 return true;
75 }
76
73 ScrollbarOrientation PaintedScrollbarLayer::orientation() const { 77 ScrollbarOrientation PaintedScrollbarLayer::orientation() const {
74 return scrollbar_->Orientation(); 78 return scrollbar_->Orientation();
75 } 79 }
76 80
77 int PaintedScrollbarLayer::MaxTextureSize() { 81 int PaintedScrollbarLayer::MaxTextureSize() {
78 DCHECK(layer_tree_host()); 82 DCHECK(layer_tree_host());
79 return layer_tree_host()->GetRendererCapabilities().max_texture_size; 83 return layer_tree_host()->GetRendererCapabilities().max_texture_size;
80 } 84 }
81 85
82 float PaintedScrollbarLayer::ClampScaleToMaxTextureSize(float scale) { 86 float PaintedScrollbarLayer::ClampScaleToMaxTextureSize(float scale) {
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 304
301 scrollbar_->PaintPart(&skcanvas, part, layer_rect); 305 scrollbar_->PaintPart(&skcanvas, part, layer_rect);
302 // Make sure that the pixels are no longer mutable to unavoid unnecessary 306 // Make sure that the pixels are no longer mutable to unavoid unnecessary
303 // allocation and copying. 307 // allocation and copying.
304 skbitmap.setImmutable(); 308 skbitmap.setImmutable();
305 309
306 return UIResourceBitmap(skbitmap); 310 return UIResourceBitmap(skbitmap);
307 } 311 }
308 312
309 } // namespace cc 313 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/painted_scrollbar_layer.h ('k') | cc/layers/scrollbar_layer_impl_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698