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

Unified Diff: chrome/browser/ui/views/tabs/dragged_tab_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
« no previous file with comments | « chrome/browser/ui/views/notifications/balloon_view.cc ('k') | chrome/browser/ui/views/toolbar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/dragged_tab_view.cc
diff --git a/chrome/browser/ui/views/tabs/dragged_tab_view.cc b/chrome/browser/ui/views/tabs/dragged_tab_view.cc
index ce196a5c3811200368d6cc0ae608ac790070b7f9..70a1a6a43040756bf996e836975927e4b3574b51 100644
--- a/chrome/browser/ui/views/tabs/dragged_tab_view.cc
+++ b/chrome/browser/ui/views/tabs/dragged_tab_view.cc
@@ -141,17 +141,15 @@ void DraggedTabView::PaintDetachedView(gfx::Canvas* canvas) {
bitmap_device.eraseARGB(0, 0, 0, 0);
int tab_height = renderer_bounds_.back().height();
- scale_canvas.FillRectInt(kDraggedTabBorderColor, 0,
- tab_height - kDragFrameBorderSize,
- ps.width(), ps.height() - tab_height);
- int image_x = kDragFrameBorderSize;
- int image_y = tab_height;
- int image_w = ps.width() - kTwiceDragFrameBorderSize;
- int image_h = contents_size_.height();
- scale_canvas.FillRectInt(SK_ColorBLACK, image_x, image_y, image_w, image_h);
- photobooth_->PaintScreenshotIntoCanvas(
- &scale_canvas,
- gfx::Rect(image_x, image_y, image_w, image_h));
+ scale_canvas.FillRect(kDraggedTabBorderColor,
+ gfx::Rect(0, tab_height - kDragFrameBorderSize,
+ ps.width(), ps.height() - tab_height));
+ gfx::Rect image_rect(kDragFrameBorderSize,
+ tab_height,
+ ps.width() - kTwiceDragFrameBorderSize,
+ contents_size_.height());
+ scale_canvas.FillRect(SK_ColorBLACK, image_rect);
+ photobooth_->PaintScreenshotIntoCanvas(&scale_canvas, image_rect);
for (size_t i = 0; i < renderers_.size(); ++i)
renderers_[i]->Paint(&scale_canvas);
« no previous file with comments | « chrome/browser/ui/views/notifications/balloon_view.cc ('k') | chrome/browser/ui/views/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698