| Index: ui/views/view.cc
|
| diff --git a/ui/views/view.cc b/ui/views/view.cc
|
| index e6d51dd2cc56b693ab36adcce0041bb033c29352..ac8031943a1d887aeebc151452a8de0157ea6bd5 100644
|
| --- a/ui/views/view.cc
|
| +++ b/ui/views/view.cc
|
| @@ -841,16 +841,8 @@ void View::Paint(const ui::PaintContext& parent_context) {
|
| if (is_invalidated || !paint_cache_.UseCache(context, size())) {
|
| ui::PaintRecorder recorder(context, size(), &paint_cache_);
|
| gfx::Canvas* canvas = recorder.canvas();
|
| -
|
| - // If the View we are about to paint requested the canvas to be flipped, we
|
| - // should change the transform appropriately.
|
| - // The canvas mirroring is undone once the View is done painting so that we
|
| - // don't pass the canvas with the mirrored transform to Views that didn't
|
| - // request the canvas to be flipped.
|
| - if (FlipCanvasOnPaintForRTLUI()) {
|
| - canvas->Translate(gfx::Vector2d(width(), 0));
|
| - canvas->Scale(-1, 1);
|
| - }
|
| + gfx::ScopedRTLFlipCanvas scoped_canvas(canvas, width(),
|
| + flip_canvas_on_paint_for_rtl_ui_);
|
|
|
| // Delegate painting the contents of the View to the virtual OnPaint method.
|
| OnPaint(canvas);
|
|
|