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

Unified Diff: ui/views/controls/scrollbar/bitmap_scroll_bar.cc

Issue 9332006: ui/gfx: Make the first version of Canvas::TileImageInt take a gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/scrollbar/bitmap_scroll_bar.cc
diff --git a/ui/views/controls/scrollbar/bitmap_scroll_bar.cc b/ui/views/controls/scrollbar/bitmap_scroll_bar.cc
index f0a8db3f6b1c16f9159270b5ab7ddec7a0be6648..203a497b50898748d356db9c7a2a016117433f12 100644
--- a/ui/views/controls/scrollbar/bitmap_scroll_bar.cc
+++ b/ui/views/controls/scrollbar/bitmap_scroll_bar.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -124,8 +124,8 @@ class BitmapScrollBarThumb : public BaseScrollBarThumb {
int top_cap_height = start_cap_bitmap()->height();
int bottom_cap_height = end_cap_bitmap()->height();
int thumb_body_height = height() - top_cap_height - bottom_cap_height;
- canvas->TileImageInt(*background_bitmap(), 0, top_cap_height,
- background_bitmap()->width(), thumb_body_height);
+ canvas->TileImage(*background_bitmap(), gfx::Rect(0, top_cap_height,
+ background_bitmap()->width(), thumb_body_height));
canvas->DrawBitmapInt(*end_cap_bitmap(), 0,
height() - bottom_cap_height);
@@ -293,9 +293,9 @@ void BitmapScrollBar::Layout() {
void BitmapScrollBar::OnPaint(gfx::Canvas* canvas) {
// Paint the track.
gfx::Rect track_bounds = GetTrackBounds();
- canvas->TileImageInt(*images_[THUMB_TRACK][GetThumbTrackState()],
- track_bounds.x(), track_bounds.y(),
- track_bounds.width(), track_bounds.height());
+ canvas->TileImage(*images_[THUMB_TRACK][GetThumbTrackState()],
+ gfx::Rect(track_bounds.x(), track_bounds.y(),
Peter Kasting 2012/02/06 22:32:39 Nit: Just pass GetTrackBounds() directly and drop
tfarina 2012/02/06 23:12:16 Done.
+ track_bounds.width(), track_bounds.height()));
}
///////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698