diff options
Diffstat (limited to 'chrome/common/gfx/chrome_canvas.cc')
-rw-r--r-- | chrome/common/gfx/chrome_canvas.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/chrome/common/gfx/chrome_canvas.cc b/chrome/common/gfx/chrome_canvas.cc index f439680..673b73b 100644 --- a/chrome/common/gfx/chrome_canvas.cc +++ b/chrome/common/gfx/chrome_canvas.cc @@ -208,12 +208,7 @@ void ChromeCanvas::DrawBitmapInt(const SkBitmap& bitmap, int src_x, int src_y, void ChromeCanvas::TileImageInt(const SkBitmap& bitmap, int x, int y, int w, int h) { - TileImageInt(bitmap, 0, 0, x, y, w, h); -} - -void ChromeCanvas::TileImageInt(const SkBitmap& bitmap, int src_x, int src_y, - int dest_x, int dest_y, int w, int h) { - if (!IntersectsClipRectInt(dest_x, dest_y, w, h)) + if (!IntersectsClipRectInt(x, y, w, h)) return; SkPaint paint; @@ -228,8 +223,8 @@ void ChromeCanvas::TileImageInt(const SkBitmap& bitmap, int src_x, int src_y, // need to unref after paint takes ownership of the shader. shader->unref(); save(); - translate(SkIntToScalar(dest_x - src_x), SkIntToScalar(dest_y - src_y)); - ClipRectInt(src_x, src_y, w, h); + translate(SkIntToScalar(x), SkIntToScalar(y)); + ClipRectInt(0, 0, w, h); drawPaint(paint); restore(); } |