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

Unified Diff: ui/gfx/scoped_canvas.h

Issue 2261593002: Use ScopedRTLFlipCanvas more pervasively for RTL flipping. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix namespace Created 4 years, 4 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 | « ui/gfx/paint_vector_icon.cc ('k') | ui/gfx/scoped_canvas.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/scoped_canvas.h
diff --git a/ui/gfx/scoped_canvas.h b/ui/gfx/scoped_canvas.h
index bee478b56343dc45d410f81a07bcda60295cc7a8..96ccaffa25d3a28c1f6d4b0295b5224afeeed224 100644
--- a/ui/gfx/scoped_canvas.h
+++ b/ui/gfx/scoped_canvas.h
@@ -11,8 +11,6 @@
namespace gfx {
-class Rect;
-
// Saves the drawing state, and restores the state when going out of scope.
class GFX_EXPORT ScopedCanvas {
public:
@@ -31,12 +29,12 @@ class GFX_EXPORT ScopedCanvas {
DISALLOW_COPY_AND_ASSIGN(ScopedCanvas);
};
-// Saves the drawing state, and applies an RTL transform for the supplied rect
-// if the UI is in RTL layout. The resulting transform is such that anything
-// drawn inside the supplied rect will be flipped horizontally.
+// Saves the drawing state. If |flip| is true, and the UI is in RTL layout,
+// applies a transform such that anything drawn inside the supplied width will
+// be flipped horizontally.
class GFX_EXPORT ScopedRTLFlipCanvas {
public:
- ScopedRTLFlipCanvas(gfx::Canvas* canvas, const gfx::Rect& rect);
+ ScopedRTLFlipCanvas(gfx::Canvas* canvas, int width, bool flip = true);
~ScopedRTLFlipCanvas() {}
private:
« no previous file with comments | « ui/gfx/paint_vector_icon.cc ('k') | ui/gfx/scoped_canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698