| Index: chrome/common/gfx/chrome_canvas.cc
|
| diff --git a/chrome/common/gfx/chrome_canvas.cc b/chrome/common/gfx/chrome_canvas.cc
|
| index 647983e3ae2a3091a6918c1c51e0bb3ac251dfa4..ce9354ff3cbc5109958785439e1fcfc919e19f67 100644
|
| --- a/chrome/common/gfx/chrome_canvas.cc
|
| +++ b/chrome/common/gfx/chrome_canvas.cc
|
| @@ -58,9 +58,8 @@ void ChromeCanvas::FillRectInt(const SkColor& color,
|
|
|
| void ChromeCanvas::FillRectInt(int x, int y, int w, int h,
|
| const SkPaint& paint) {
|
| - SkRect rc = {SkIntToScalar(x), SkIntToScalar(y),
|
| - SkIntToScalar(x + w), SkIntToScalar(y + h) };
|
| - drawRect(rc, paint);
|
| + SkIRect rc = {x, y, x + w, y + h};
|
| + drawIRect(rc, paint);
|
| }
|
|
|
| void ChromeCanvas::DrawRectInt(const SkColor& color,
|
| @@ -68,18 +67,20 @@ void ChromeCanvas::DrawRectInt(const SkColor& color,
|
| DrawRectInt(color, x, y, w, h, SkPorterDuff::kSrcOver_Mode);
|
| }
|
|
|
| -void ChromeCanvas::DrawRectInt(const SkColor& color, int x, int y, int w, int h,
|
| +void ChromeCanvas::DrawRectInt(const SkColor& color,
|
| + int x, int y, int w, int h,
|
| SkPorterDuff::Mode mode) {
|
| SkPaint paint;
|
| paint.setColor(color);
|
| paint.setStyle(SkPaint::kStroke_Style);
|
| - // Contrary to the docs, a width of 0 results in nothing.
|
| - paint.setStrokeWidth(SkIntToScalar(1));
|
| + // Set a stroke width of 0, which will put us down the stroke rect path. If
|
| + // we set a stroke width of 1, for example, this will internally create a
|
| + // path and fill it, which causes problems near the edge of the canvas.
|
| + paint.setStrokeWidth(SkIntToScalar(0));
|
| paint.setPorterDuffXfermode(mode);
|
|
|
| - SkRect rc = {SkIntToScalar(x), SkIntToScalar(y),
|
| - SkIntToScalar(x + w), SkIntToScalar(y + h) };
|
| - drawRect(rc, paint);
|
| + SkIRect rc = {x, y, x + w, y + h};
|
| + drawIRect(rc, paint);
|
| }
|
|
|
| void ChromeCanvas::DrawFocusRect(int x, int y, int width, int height) {
|
|
|