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

Unified Diff: ui/views/window/custom_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: reland 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/custom_frame_view.cc
diff --git a/ui/views/window/custom_frame_view.cc b/ui/views/window/custom_frame_view.cc
index dc3a4b245b1dc20bb359b4c4eeeea3d63d29b2e1..6089c3959e903d1a024379410cea6aea5477f055 100644
--- a/ui/views/window/custom_frame_view.cc
+++ b/ui/views/window/custom_frame_view.cc
@@ -371,8 +371,8 @@ void CustomFrameView::PaintMaximizedFrameBorder(gfx::Canvas* canvas) {
SkBitmap* titlebar_bottom = rb.GetBitmapNamed(IDR_APP_TOP_CENTER);
int edge_height = titlebar_bottom->height() -
(ShouldShowClientEdge() ? kClientEdgeThickness : 0);
- canvas->TileImageInt(*titlebar_bottom, 0,
- frame_->client_view()->y() - edge_height, width(), edge_height);
+ canvas->TileImage(*titlebar_bottom, gfx::Rect(0,
+ frame_->client_view()->y() - edge_height, width(), edge_height));
}
void CustomFrameView::PaintTitleBar(gfx::Canvas* canvas) {
@@ -410,28 +410,28 @@ void CustomFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
int top_edge_y = client_area_top - top->height();
canvas->DrawBitmapInt(*top_left, client_area_bounds.x() - top_left->width(),
top_edge_y);
- canvas->TileImageInt(*top, client_area_bounds.x(), top_edge_y,
- client_area_bounds.width(), top->height());
+ canvas->TileImage(*top, gfx::Rect(client_area_bounds.x(), top_edge_y,
+ client_area_bounds.width(), top->height()));
canvas->DrawBitmapInt(*top_right, client_area_bounds.right(), top_edge_y);
// Right.
int client_area_bottom =
std::max(client_area_top, client_area_bounds.bottom());
int client_area_height = client_area_bottom - client_area_top;
- canvas->TileImageInt(*right, client_area_bounds.right(), client_area_top,
- right->width(), client_area_height);
+ canvas->TileImage(*right, gfx::Rect(client_area_bounds.right(),
+ client_area_top, right->width(), client_area_height));
// Bottom.
canvas->DrawBitmapInt(*bottom_right, client_area_bounds.right(),
client_area_bottom);
- canvas->TileImageInt(*bottom, client_area_bounds.x(), client_area_bottom,
- client_area_bounds.width(), bottom_right->height());
+ canvas->TileImage(*bottom, gfx::Rect(client_area_bounds.x(),
+ client_area_bottom, client_area_bounds.width(), bottom_right->height()));
canvas->DrawBitmapInt(*bottom_left,
client_area_bounds.x() - bottom_left->width(), client_area_bottom);
// Left.
- canvas->TileImageInt(*left, client_area_bounds.x() - left->width(),
- client_area_top, left->width(), client_area_height);
+ canvas->TileImage(*left, gfx::Rect(client_area_bounds.x() - left->width(),
+ client_area_top, left->width(), client_area_height));
// Draw the toolbar color to fill in the edges.
canvas->DrawRect(gfx::Rect(client_area_bounds.x() - 1, client_area_top - 1,

Powered by Google App Engine
This is Rietveld 408576698