diff options
Diffstat (limited to 'chrome/common/gfx')
-rw-r--r-- | chrome/common/gfx/chrome_canvas.cc | 11 | ||||
-rw-r--r-- | chrome/common/gfx/chrome_canvas.h | 2 |
2 files changed, 3 insertions, 10 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(); } diff --git a/chrome/common/gfx/chrome_canvas.h b/chrome/common/gfx/chrome_canvas.h index 370098f..6465298 100644 --- a/chrome/common/gfx/chrome_canvas.h +++ b/chrome/common/gfx/chrome_canvas.h @@ -152,8 +152,6 @@ class ChromeCanvas : public skia::PlatformCanvas { // Tiles the image in the specified region. void TileImageInt(const SkBitmap& bitmap, int x, int y, int w, int h); - void TileImageInt(const SkBitmap& bitmap, int src_x, int src_y, int dest_x, - int dest_y, int w, int h); // Extracts a bitmap from the contents of this canvas. SkBitmap ExtractBitmap(); |