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

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

Issue 1455023002: cc: Replace Pass() with std::move() in some subdirs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pass-cc
Patch Set: pass-cc2: . Created 5 years, 1 month 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/layer_utils_unittest.cc ('k') | cc/layers/picture_image_layer.cc » ('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 "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 17 matching lines...) Expand all
28 scoped_ptr<LayerImpl> PaintedScrollbarLayer::CreateLayerImpl( 28 scoped_ptr<LayerImpl> PaintedScrollbarLayer::CreateLayerImpl(
29 LayerTreeImpl* tree_impl) { 29 LayerTreeImpl* tree_impl) {
30 return PaintedScrollbarLayerImpl::Create( 30 return PaintedScrollbarLayerImpl::Create(
31 tree_impl, id(), scrollbar_->Orientation()); 31 tree_impl, id(), scrollbar_->Orientation());
32 } 32 }
33 33
34 scoped_refptr<PaintedScrollbarLayer> PaintedScrollbarLayer::Create( 34 scoped_refptr<PaintedScrollbarLayer> PaintedScrollbarLayer::Create(
35 const LayerSettings& settings, 35 const LayerSettings& settings,
36 scoped_ptr<Scrollbar> scrollbar, 36 scoped_ptr<Scrollbar> scrollbar,
37 int scroll_layer_id) { 37 int scroll_layer_id) {
38 return make_scoped_refptr( 38 return make_scoped_refptr(new PaintedScrollbarLayer(
39 new PaintedScrollbarLayer(settings, scrollbar.Pass(), scroll_layer_id)); 39 settings, std::move(scrollbar), scroll_layer_id));
40 } 40 }
41 41
42 PaintedScrollbarLayer::PaintedScrollbarLayer(const LayerSettings& settings, 42 PaintedScrollbarLayer::PaintedScrollbarLayer(const LayerSettings& settings,
43 scoped_ptr<Scrollbar> scrollbar, 43 scoped_ptr<Scrollbar> scrollbar,
44 int scroll_layer_id) 44 int scroll_layer_id)
45 : Layer(settings), 45 : Layer(settings),
46 scrollbar_(scrollbar.Pass()), 46 scrollbar_(std::move(scrollbar)),
47 scroll_layer_id_(scroll_layer_id), 47 scroll_layer_id_(scroll_layer_id),
48 internal_contents_scale_(1.f), 48 internal_contents_scale_(1.f),
49 thumb_thickness_(scrollbar_->ThumbThickness()), 49 thumb_thickness_(scrollbar_->ThumbThickness()),
50 thumb_length_(scrollbar_->ThumbLength()), 50 thumb_length_(scrollbar_->ThumbLength()),
51 is_overlay_(scrollbar_->IsOverlay()), 51 is_overlay_(scrollbar_->IsOverlay()),
52 has_thumb_(scrollbar_->HasThumb()) { 52 has_thumb_(scrollbar_->HasThumb()) {
53 if (!scrollbar_->IsOverlay()) 53 if (!scrollbar_->IsOverlay())
54 SetShouldScrollOnMainThread(true); 54 SetShouldScrollOnMainThread(true);
55 } 55 }
56 56
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 293
294 scrollbar_->PaintPart(&skcanvas, part, layer_rect); 294 scrollbar_->PaintPart(&skcanvas, part, layer_rect);
295 // Make sure that the pixels are no longer mutable to unavoid unnecessary 295 // Make sure that the pixels are no longer mutable to unavoid unnecessary
296 // allocation and copying. 296 // allocation and copying.
297 skbitmap.setImmutable(); 297 skbitmap.setImmutable();
298 298
299 return UIResourceBitmap(skbitmap); 299 return UIResourceBitmap(skbitmap);
300 } 300 }
301 301
302 } // namespace cc 302 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_utils_unittest.cc ('k') | cc/layers/picture_image_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698