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

Unified Diff: chrome/browser/ui/views/frame/glass_browser_frame_view.cc

Issue 8405002: ui/gfx: Convert Canvas::FillRectInt() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: save some vertical space, interactive_ui_tests are fixed by Peter's fix Created 9 years, 2 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/frame/glass_browser_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
index 8187a6cfee7700dbddd5a1aed1a43d6304c2afe6..c92c7dfa561874258700bbcddbe10fb314611d74 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -330,9 +330,11 @@ void GlassBrowserFrameView::PaintToolbarBackground(gfx::Canvas* canvas) {
right_x, y);
// Draw the content/toolbar separator.
- canvas->FillRectInt(ResourceBundle::toolbar_separator_color,
- x + kClientEdgeThickness, toolbar_bounds.bottom() - kClientEdgeThickness,
- w - (2 * kClientEdgeThickness), kClientEdgeThickness);
+ canvas->FillRect(ResourceBundle::toolbar_separator_color,
+ gfx::Rect(x + kClientEdgeThickness,
+ toolbar_bounds.bottom() - kClientEdgeThickness,
+ w - (2 * kClientEdgeThickness),
+ kClientEdgeThickness));
}
void GlassBrowserFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
@@ -372,15 +374,16 @@ void GlassBrowserFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
// images because the images are meant to alpha-blend atop the frame whereas
// these rects are meant to be fully opaque, without anything overlaid.
SkColor toolbar_color = tp->GetColor(ThemeService::COLOR_TOOLBAR);
- canvas->FillRectInt(toolbar_color,
- client_area_bounds.x() - kClientEdgeThickness, client_area_top,
- kClientEdgeThickness,
- client_area_bottom + kClientEdgeThickness - client_area_top);
- canvas->FillRectInt(toolbar_color, client_area_bounds.x(), client_area_bottom,
- client_area_bounds.width(), kClientEdgeThickness);
- canvas->FillRectInt(toolbar_color, client_area_bounds.right(),
- client_area_top, kClientEdgeThickness,
- client_area_bottom + kClientEdgeThickness - client_area_top);
+ canvas->FillRect(toolbar_color,
+ gfx::Rect(client_area_bounds.x() - kClientEdgeThickness, client_area_top,
+ kClientEdgeThickness,
+ client_area_bottom + kClientEdgeThickness - client_area_top));
+ canvas->FillRect(toolbar_color,
+ gfx::Rect(client_area_bounds.x(), client_area_bottom,
+ client_area_bounds.width(), kClientEdgeThickness));
+ canvas->FillRect(toolbar_color, gfx::Rect(client_area_bounds.right(),
+ client_area_top, kClientEdgeThickness,
+ client_area_bottom + kClientEdgeThickness - client_area_top));
}
void GlassBrowserFrameView::LayoutAvatar() {

Powered by Google App Engine
This is Rietveld 408576698