Index: ui/gfx/canvas_skia.cc |
diff --git a/ui/gfx/canvas_skia.cc b/ui/gfx/canvas_skia.cc |
index c93dd09fd5676126be5391ddfe1c589bcd81021d..467514a7c4095ba3cf32bdcb03b18ed0af02eff6 100644 |
--- a/ui/gfx/canvas_skia.cc |
+++ b/ui/gfx/canvas_skia.cc |
@@ -181,7 +181,7 @@ void CanvasSkia::DrawLineInt(const SkColor& color, |
SkIntToScalar(y2), paint); |
} |
-void CanvasSkia::DrawFocusRect(int x, int y, int width, int height) { |
+void CanvasSkia::DrawFocusRect(const gfx::Rect& rect) { |
// Create a 2D bitmap containing alternating on/off pixels - we do this |
// so that you never get two pixels of the same color around the edges |
// of the focus rect (this may mean that opposing edges of the rect may |
@@ -219,10 +219,10 @@ void CanvasSkia::DrawFocusRect(int x, int y, int width, int height) { |
paint.setShader(shader); |
shader->unref(); |
- DrawRectInt(x, y, width, 1, paint); |
- DrawRectInt(x, y + height - 1, width, 1, paint); |
- DrawRectInt(x, y, 1, height, paint); |
- DrawRectInt(x + width - 1, y, 1, height, paint); |
+ DrawRectInt(rect.x(), rect.y(), rect.width(), 1, paint); |
+ DrawRectInt(rect.x(), rect.y() + rect.height() - 1, rect.width(), 1, paint); |
+ DrawRectInt(rect.x(), rect.y(), 1, rect.height(), paint); |
+ DrawRectInt(rect.x() + rect.width() - 1, rect.y(), 1, rect.height(), paint); |
} |
void CanvasSkia::DrawBitmapInt(const SkBitmap& bitmap, int x, int y) { |