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

Unified Diff: chrome/browser/ui/views/tabs/tab.cc

Issue 8476019: ui/gfx: Convert Canvas::DrawRectInt() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reland - WHAT HERE could have broken media_unittests???? Created 9 years, 1 month 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 f5f244c0236efcc0332b9eddeec43d427a6b9ce5..ae088acd734ede252876e52bfc4a77edda523e14 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -397,7 +397,8 @@ void Tab::PaintInactiveTabBackgroundWithTitleChange(gfx::Canvas* canvas) {
SkShader::kClamp_TileMode);
paint.setShader(shader);
shader->unref();
- hover_canvas.DrawRectInt(x - radius, -radius, radius * 2, radius * 2, paint);
+ hover_canvas.DrawRect(gfx::Rect(x - radius, -radius, radius * 2, radius * 2),
+ paint);
// Draw the radial gradient clipped to the background into hover_image.
SkBitmap hover_image = SkBitmapOperations::CreateMaskedBitmap(
@@ -577,9 +578,9 @@ SkBitmap Tab::DrawHoverGlowBitmap(int width_input, int height_input) {
if (shader) {
paint.setShader(shader);
shader->unref();
- hover_canvas.DrawRectInt(hover_point_.x() - radius,
- hover_point_.y() - radius,
- radius * 2, radius * 2, paint);
+ gfx::Rect paint_rect(hover_point_, gfx::Size());
+ paint_rect.Inset(-radius, -radius);
+ hover_canvas.DrawRect(paint_rect, paint);
}
return hover_canvas.ExtractBitmap();
}
« no previous file with comments | « chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698