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

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

Issue 1172873002: cc: Init PaintedScrollbarLayer::internal_contents_scale_ to 1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | 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 28 matching lines...) Expand all
39 new PaintedScrollbarLayer(settings, scrollbar.Pass(), scroll_layer_id)); 39 new PaintedScrollbarLayer(settings, scrollbar.Pass(), 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_(scrollbar.Pass()),
47 scroll_layer_id_(scroll_layer_id), 47 scroll_layer_id_(scroll_layer_id),
48 clip_layer_id_(Layer::INVALID_ID), 48 clip_layer_id_(Layer::INVALID_ID),
49 internal_contents_scale_(0.f), 49 internal_contents_scale_(1.f),
50 thumb_thickness_(scrollbar_->ThumbThickness()), 50 thumb_thickness_(scrollbar_->ThumbThickness()),
51 thumb_length_(scrollbar_->ThumbLength()), 51 thumb_length_(scrollbar_->ThumbLength()),
52 is_overlay_(scrollbar_->IsOverlay()), 52 is_overlay_(scrollbar_->IsOverlay()),
53 has_thumb_(scrollbar_->HasThumb()) { 53 has_thumb_(scrollbar_->HasThumb()) {
54 if (!scrollbar_->IsOverlay()) 54 if (!scrollbar_->IsOverlay())
55 SetShouldScrollOnMainThread(true); 55 SetShouldScrollOnMainThread(true);
56 } 56 }
57 57
58 PaintedScrollbarLayer::~PaintedScrollbarLayer() {} 58 PaintedScrollbarLayer::~PaintedScrollbarLayer() {}
59 59
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 316
317 scrollbar_->PaintPart(&skcanvas, part, layer_rect); 317 scrollbar_->PaintPart(&skcanvas, part, layer_rect);
318 // Make sure that the pixels are no longer mutable to unavoid unnecessary 318 // Make sure that the pixels are no longer mutable to unavoid unnecessary
319 // allocation and copying. 319 // allocation and copying.
320 skbitmap.setImmutable(); 320 skbitmap.setImmutable();
321 321
322 return UIResourceBitmap(skbitmap); 322 return UIResourceBitmap(skbitmap);
323 } 323 }
324 324
325 } // namespace cc 325 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698