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

Side by Side Diff: cc/test/fake_scrollbar.cc

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! Created 6 years, 11 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/test/fake_scrollbar.h ('k') | cc/test/layer_test_common.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/test/fake_scrollbar.h" 5 #include "cc/test/fake_scrollbar.h"
6 6
7 #include "third_party/skia/include/core/SkCanvas.h" 7 #include "third_party/skia/include/core/SkCanvas.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 int FakeScrollbar::ThumbLength() const { 49 int FakeScrollbar::ThumbLength() const {
50 return thumb_length_; 50 return thumb_length_;
51 } 51 }
52 52
53 gfx::Rect FakeScrollbar::TrackRect() const { 53 gfx::Rect FakeScrollbar::TrackRect() const {
54 return track_rect_; 54 return track_rect_;
55 } 55 }
56 56
57 void FakeScrollbar::PaintPart(SkCanvas* canvas, 57 void FakeScrollbar::PaintPart(SkCanvas* canvas,
58 ScrollbarPart part, 58 ScrollbarPart part,
59 gfx::Rect content_rect) { 59 const gfx::Rect& content_rect) {
60 if (!paint_) 60 if (!paint_)
61 return; 61 return;
62 62
63 // Fill the scrollbar with a different color each time. 63 // Fill the scrollbar with a different color each time.
64 fill_color_++; 64 fill_color_++;
65 canvas->clear(SK_ColorBLACK | fill_color_); 65 canvas->clear(SK_ColorBLACK | fill_color_);
66 } 66 }
67 67
68 } // namespace cc 68 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_scrollbar.h ('k') | cc/test/layer_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698