Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Unified Diff: ui/gfx/canvas_skia.cc

Issue 8405002: ui/gfx: Convert Canvas::FillRectInt() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: save some vertical space, interactive_ui_tests are fixed by Peter's fix Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/canvas_skia.h ('k') | ui/gfx/canvas_skia_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/canvas_skia.cc
diff --git a/ui/gfx/canvas_skia.cc b/ui/gfx/canvas_skia.cc
index 2f822e58454ccf96949c2b9b2923cccf6d54b867..98e4776945ff134daf0f160267e5634d293910c5 100644
--- a/ui/gfx/canvas_skia.cc
+++ b/ui/gfx/canvas_skia.cc
@@ -122,27 +122,26 @@ void CanvasSkia::Scale(int x_scale, int y_scale) {
canvas_->scale(SkIntToScalar(x_scale), SkIntToScalar(y_scale));
}
-void CanvasSkia::FillRectInt(const SkColor& color, int x, int y, int w, int h) {
- FillRectInt(color, x, y, w, h, SkXfermode::kSrcOver_Mode);
+void CanvasSkia::FillRect(const SkColor& color, const gfx::Rect& rect) {
+ FillRect(color, rect, SkXfermode::kSrcOver_Mode);
}
-void CanvasSkia::FillRectInt(const SkColor& color,
- int x, int y, int w, int h,
- SkXfermode::Mode mode) {
+void CanvasSkia::FillRect(const SkColor& color,
+ const gfx::Rect& rect,
+ SkXfermode::Mode mode) {
SkPaint paint;
paint.setColor(color);
paint.setStyle(SkPaint::kFill_Style);
paint.setXfermodeMode(mode);
- DrawRectInt(x, y, w, h, paint);
+ DrawRectInt(rect.x(), rect.y(), rect.width(), rect.height(), paint);
}
-void CanvasSkia::FillRectInt(const gfx::Brush* brush,
- int x, int y, int w, int h) {
+void CanvasSkia::FillRect(const gfx::Brush* brush, const gfx::Rect& rect) {
const SkiaShader* shader = static_cast<const SkiaShader*>(brush);
SkPaint paint;
paint.setShader(shader->shader());
// TODO(beng): set shader transform to match canvas transform.
- DrawRectInt(x, y, w, h, paint);
+ DrawRectInt(rect.x(), rect.y(), rect.width(), rect.height(), paint);
}
void CanvasSkia::DrawRectInt(const SkColor& color, int x, int y, int w, int h) {
« no previous file with comments | « ui/gfx/canvas_skia.h ('k') | ui/gfx/canvas_skia_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698