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

Unified Diff: chrome/browser/ui/panels/panel_browser_frame_view.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
« no previous file with comments | « chrome/browser/ntp_background_util.cc ('k') | chrome/browser/ui/views/about_chrome_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_browser_frame_view.cc
diff --git a/chrome/browser/ui/panels/panel_browser_frame_view.cc b/chrome/browser/ui/panels/panel_browser_frame_view.cc
index bc437d462d3334338524aa00eca49005fe9a539f..191217bc259586377dda0bd62fdea62b604049c7 100644
--- a/chrome/browser/ui/panels/panel_browser_frame_view.cc
+++ b/chrome/browser/ui/panels/panel_browser_frame_view.cc
@@ -786,7 +786,7 @@ void PanelBrowserFrameView::PaintFrameBorder(gfx::Canvas* canvas) {
canvas->DrawRect(gfx::Rect(0, 0, width(), kTitlebarHeight), paint);
} else {
SkBitmap* bitmap = GetFrameTheme(paint_state_);
- canvas->TileImageInt(*bitmap, 0, 0, width(), kTitlebarHeight);
+ canvas->TileImage(*bitmap, gfx::Rect(0, 0, width(), kTitlebarHeight));
}
#if defined(USE_AURA)
@@ -802,41 +802,43 @@ void PanelBrowserFrameView::PaintFrameBorder(gfx::Canvas* canvas) {
// Draw the top border.
const EdgeResources& frame_edges = GetFrameEdges();
canvas->DrawBitmapInt(*(frame_edges.top_left), 0, 0);
- canvas->TileImageInt(
- *(frame_edges.top), frame_edges.top_left->width(), 0,
- width() - frame_edges.top_right->width(), frame_edges.top->height());
+ canvas->TileImageInt(*(frame_edges.top),
+ gfx::Rect(frame_edges.top_left->width(), 0,
+ width() - frame_edges.top_left->width() -
+ frame_edges.top_right->width(),
+ frame_edges.top->height()));
canvas->DrawBitmapInt(
*(frame_edges.top_right),
width() - frame_edges.top_right->width(), 0);
// Draw the right border.
- canvas->TileImageInt(
- *(frame_edges.right), width() - frame_edges.right->width(),
- frame_edges.top_right->height(), frame_edges.right->width(),
- height() - frame_edges.top_right->height() -
- frame_edges.bottom_right->height());
+ canvas->TileImage(*(frame_edges.right),
+ gfx::Rect(width() - frame_edges.right->width(),
+ frame_edges.top_right->height(), frame_edges.right->width(),
+ height() - frame_edges.top_right->height() -
+ frame_edges.bottom_right->height()));
// Draw the bottom border.
canvas->DrawBitmapInt(
*(frame_edges.bottom_right),
width() - frame_edges.bottom_right->width(),
height() - frame_edges.bottom_right->height());
- canvas->TileImageInt(
- *(frame_edges.bottom), frame_edges.bottom_left->width(),
- height() - frame_edges.bottom->height(),
- width() - frame_edges.bottom_left->width() -
- frame_edges.bottom_right->width(),
- frame_edges.bottom->height());
+ canvas->TileImage(*(frame_edges.bottom),
+ gfx::Rect(frame_edges.bottom_left->width(),
+ height() - frame_edges.bottom->height(),
+ width() - frame_edges.bottom_left->width() -
+ frame_edges.bottom_right->width(),
+ frame_edges.bottom->height()));
canvas->DrawBitmapInt(
*(frame_edges.bottom_left), 0,
height() - frame_edges.bottom_left->height());
// Draw the left border.
- canvas->TileImageInt(
- *(frame_edges.left), 0, frame_edges.top_left->height(),
+ canvas->TileImage(*(frame_edges.left), gfx::Rect(0,
+ frame_edges.top_left->height(),
frame_edges.left->width(),
height() - frame_edges.top_left->height() -
- frame_edges.bottom_left->height());
+ frame_edges.bottom_left->height()));
// Draw the divider between the titlebar and the client area.
if (height() > kTitlebarHeight) {
« no previous file with comments | « chrome/browser/ntp_background_util.cc ('k') | chrome/browser/ui/views/about_chrome_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698