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

Unified Diff: ui/views/window/frame_background.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/window/frame_background.cc
diff --git a/ui/views/window/frame_background.cc b/ui/views/window/frame_background.cc
index 553604f089c653059eb855c6eb717733c577eebe..a6c2190421e046bcdabbf7d9291d78f0786550f5 100644
--- a/ui/views/window/frame_background.cc
+++ b/ui/views/window/frame_background.cc
@@ -69,8 +69,8 @@ void FrameBackground::PaintRestored(gfx::Canvas* canvas, View* view) const {
PaintFrameColor(canvas, view);
// Draw the theme frame.
- canvas->TileImageInt(*theme_bitmap_,
- 0, 0, view->width(), theme_bitmap_->height());
+ canvas->TileImage(*theme_bitmap_,
+ gfx::Rect(0, 0, view->width(), theme_bitmap_->height()));
// Draw the theme frame overlay, if available.
if (theme_overlay_bitmap_)
@@ -85,11 +85,10 @@ void FrameBackground::PaintRestored(gfx::Canvas* canvas, View* view) const {
0, 0, top_left_corner_->width(), top_left_height,
0, 0, top_left_corner_->width(), top_left_height,
false);
- canvas->TileImageInt(*top_edge_,
- top_left_corner_->width(),
+ canvas->TileImage(*top_edge_, gfx::Rect(top_left_corner_->width(),
0,
view->width() - top_left_corner_->width() - top_right_corner_->width(),
- top_edge_->height());
+ top_edge_->height()));
int top_right_height =
std::min(top_right_corner_->height(),
view->height() - bottom_right_corner_->height());
@@ -103,32 +102,31 @@ void FrameBackground::PaintRestored(gfx::Canvas* canvas, View* view) const {
// Right edge.
int right_edge_height =
view->height() - top_right_height - bottom_right_corner_->height();
- canvas->TileImageInt(*right_edge_,
- view->width() - right_edge_->width(),
- top_right_height,
- right_edge_->width(),
- right_edge_height);
+ canvas->TileImage(*right_edge_,
+ gfx::Rect(view->width() - right_edge_->width(),
+ top_right_height,
+ right_edge_->width(),
+ right_edge_height));
// Bottom corners and edge.
canvas->DrawBitmapInt(*bottom_right_corner_,
view->width() - bottom_right_corner_->width(),
view->height() - bottom_right_corner_->height());
- canvas->TileImageInt(
+ canvas->TileImage(
*bottom_edge_,
- bottom_left_corner_->width(),
- view->height() - bottom_edge_->height(),
- view->width() - bottom_left_corner_->width()
- - bottom_right_corner_->width(),
- bottom_edge_->height());
+ gfx::Rect(bottom_left_corner_->width(),
+ view->height() - bottom_edge_->height(),
+ view->width() - bottom_left_corner_->width()
+ - bottom_right_corner_->width(),
Peter Kasting 2012/02/06 22:32:39 Nit: While here, '-' goes on end of prior line
tfarina 2012/02/06 23:12:16 Done.
+ bottom_edge_->height()));
canvas->DrawBitmapInt(*bottom_left_corner_, 0,
view->height() - bottom_left_corner_->height());
// Left edge.
int left_edge_height =
view->height() - top_left_height - bottom_left_corner_->height();
- canvas->TileImageInt(*left_edge_,
- 0, top_left_height,
- left_edge_->width(), left_edge_height);
+ canvas->TileImage(*left_edge_, gfx::Rect(0, top_left_height,
+ left_edge_->width(), left_edge_height));
}
void FrameBackground::PaintMaximized(gfx::Canvas* canvas, View* view) const {
@@ -159,11 +157,11 @@ void FrameBackground::PaintMaximized(gfx::Canvas* canvas, View* view) const {
}
// Draw the theme frame.
- canvas->TileImageInt(*theme_bitmap_,
- left_offset,
- maximized_top_offset_,
- view->width() - (left_offset + right_offset),
- theme_bitmap_->height());
+ canvas->TileImage(*theme_bitmap_,
+ gfx::Rect(left_offset,
+ maximized_top_offset_,
+ view->width() - (left_offset + right_offset),
+ theme_bitmap_->height()));
// Draw the theme frame overlay, if available.
if (theme_overlay_bitmap_)
canvas->DrawBitmapInt(*theme_overlay_bitmap_, 0, theme_background_y_);
« ui/views/controls/scrollbar/bitmap_scroll_bar.cc ('K') | « ui/views/window/custom_frame_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698