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

Unified Diff: chrome/browser/ui/views/tabs/tab.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: put back the Peter's nits 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: chrome/browser/ui/views/tabs/tab.cc
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index 34236eccbaa71c370817d981516681a979d0b0d3..c0d48a5fb6d1258b9aee1cd696757693608d1163 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.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.
@@ -486,13 +486,11 @@ void Tab::PaintInactiveTabBackground(gfx::Canvas* canvas) {
// Now draw the highlights/shadows around the tab edge.
canvas->DrawBitmapInt(*tab_inactive_image->image_l, 0, 0);
- canvas->TileImageInt(*tab_inactive_image->image_c,
- tab_inactive_image->l_width, 0,
- width() - tab_inactive_image->l_width -
- tab_inactive_image->r_width,
- height());
- canvas->DrawBitmapInt(*tab_inactive_image->image_r,
- width() - tab_inactive_image->r_width, 0);
+ gfx::Rect tile_rect(GetLocalBounds());
+ tile_rect.Inset(tab_inactive_image->l_width, 0,
+ tab_inactive_image->r_width, 0);
+ canvas->TileImage(*tab_inactive_image->image_c, tile_rect);
+ canvas->DrawBitmapInt(*tab_inactive_image->image_r, tile_rect.right(), 0);
}
void Tab::PaintActiveTabBackground(gfx::Canvas* canvas) {
@@ -531,8 +529,8 @@ void Tab::PaintActiveTabBackground(gfx::Canvas* canvas) {
// Now draw the highlights/shadows around the tab edge.
canvas->DrawBitmapInt(*tab_image->image_l, 0, 0);
- canvas->TileImageInt(*tab_image->image_c, tab_image->l_width, 0,
- width() - tab_image->l_width - tab_image->r_width, height());
+ canvas->TileImage(*tab_image->image_c, gfx::Rect(tab_image->l_width, 0,
+ width() - tab_image->l_width - tab_image->r_width, height()));
canvas->DrawBitmapInt(*tab_image->image_r, width() - tab_image->r_width, 0);
}
« no previous file with comments | « chrome/browser/ui/views/frame/opaque_browser_frame_view.cc ('k') | chrome/common/extensions/extension_action.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698