diff options
Diffstat (limited to 'views/view.cc')
-rw-r--r-- | views/view.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/views/view.cc b/views/view.cc index 4f04208..0a6fdd1 100644 --- a/views/view.cc +++ b/views/view.cc @@ -677,15 +677,14 @@ void View::Paint(gfx::Canvas* canvas) { // Note that the X (or left) position we pass to ClipRectInt takes into // consideration whether or not the view uses a right-to-left layout so that // we paint our view in its mirrored position if need be. - if (!canvas->ClipRectInt(gfx::Rect(GetMirroredX(), y(), - width() - static_cast<int>(clip_x_), - height() - static_cast<int>(clip_y_)))) { + if (!canvas->ClipRect(gfx::Rect(GetMirroredX(), y(), + width() - static_cast<int>(clip_x_), + height() - static_cast<int>(clip_y_)))) { return; } // Non-empty clip, translate the graphics such that 0,0 corresponds to // where this view is located (related to its parent). - canvas->TranslateInt(GetMirroredX(), y()); - + canvas->Translate(GetMirroredPosition()); canvas->Transform(GetTransform()); PaintCommon(canvas); @@ -1464,7 +1463,7 @@ void View::PaintCommon(gfx::Canvas* canvas) { // request the canvas to be flipped. ScopedCanvas scoped(canvas); if (FlipCanvasOnPaintForRTLUI()) { - canvas->TranslateInt(width(), 0); + canvas->Translate(gfx::Point(width(), 0)); canvas->ScaleInt(-1, 1); } |