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

Side by Side Diff: views/view.cc

Issue 8363036: ui/gfx: Change Canvas::ScaleInt() to just Canvas::Scale(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address Peter's review 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/controls/menu/menu_image_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "views/view.h" 5 #include "views/view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 1457
1458 { 1458 {
1459 // If the View we are about to paint requested the canvas to be flipped, we 1459 // If the View we are about to paint requested the canvas to be flipped, we
1460 // should change the transform appropriately. 1460 // should change the transform appropriately.
1461 // The canvas mirroring is undone once the View is done painting so that we 1461 // The canvas mirroring is undone once the View is done painting so that we
1462 // don't pass the canvas with the mirrored transform to Views that didn't 1462 // don't pass the canvas with the mirrored transform to Views that didn't
1463 // request the canvas to be flipped. 1463 // request the canvas to be flipped.
1464 ScopedCanvas scoped(canvas); 1464 ScopedCanvas scoped(canvas);
1465 if (FlipCanvasOnPaintForRTLUI()) { 1465 if (FlipCanvasOnPaintForRTLUI()) {
1466 canvas->Translate(gfx::Point(width(), 0)); 1466 canvas->Translate(gfx::Point(width(), 0));
1467 canvas->ScaleInt(-1, 1); 1467 canvas->Scale(-1, 1);
1468 } 1468 }
1469 1469
1470 OnPaint(canvas); 1470 OnPaint(canvas);
1471 } 1471 }
1472 1472
1473 PaintChildren(canvas); 1473 PaintChildren(canvas);
1474 } 1474 }
1475 1475
1476 // Tree operations ------------------------------------------------------------- 1476 // Tree operations -------------------------------------------------------------
1477 1477
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
2078 2078
2079 OSExchangeData data; 2079 OSExchangeData data;
2080 WriteDragData(press_pt, &data); 2080 WriteDragData(press_pt, &data);
2081 2081
2082 // Message the RootView to do the drag and drop. That way if we're removed 2082 // Message the RootView to do the drag and drop. That way if we're removed
2083 // the RootView can detect it and avoid calling us back. 2083 // the RootView can detect it and avoid calling us back.
2084 GetWidget()->RunShellDrag(this, data, drag_operations); 2084 GetWidget()->RunShellDrag(this, data, drag_operations);
2085 } 2085 }
2086 2086
2087 } // namespace views 2087 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/menu/menu_image_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698