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

Unified Diff: ui/gfx/canvas_direct2d.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_direct2d.h ('k') | ui/gfx/canvas_direct2d_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/canvas_direct2d.cc
diff --git a/ui/gfx/canvas_direct2d.cc b/ui/gfx/canvas_direct2d.cc
index 08005f4128e977de4071c5d3fd159cc3f6f132ad..5a61ace769c580a0c2fb8a8f60617c268515881a 100644
--- a/ui/gfx/canvas_direct2d.cc
+++ b/ui/gfx/canvas_direct2d.cc
@@ -202,23 +202,21 @@ void CanvasDirect2D::Scale(int x_scale, int y_scale) {
rt_->SetTransform(transform);
}
-void CanvasDirect2D::FillRectInt(const SkColor& color,
- int x, int y, int w, int h) {
+void CanvasDirect2D::FillRect(const SkColor& color, const gfx::Rect& rect) {
base::win::ScopedComPtr<ID2D1SolidColorBrush> solid_brush;
rt_->CreateSolidColorBrush(SkColorToColorF(color), solid_brush.Receive());
- rt_->FillRectangle(RectToRectF(x, y, w, h), solid_brush);
+ rt_->FillRectangle(RectToRectF(rect), solid_brush);
}
-void CanvasDirect2D::FillRectInt(const SkColor& color,
- int x, int y, int w, int h,
- SkXfermode::Mode mode) {
+void CanvasDirect2D::FillRect(const SkColor& color,
+ const gfx::Rect& rect,
+ SkXfermode::Mode mode) {
NOTIMPLEMENTED();
}
-void CanvasDirect2D::FillRectInt(const gfx::Brush* brush,
- int x, int y, int w, int h) {
+void CanvasDirect2D::FillRect(const gfx::Brush* brush, const gfx::Rect& rect) {
const Direct2DBrush* d2d_brush = static_cast<const Direct2DBrush*>(brush);
- rt_->FillRectangle(RectToRectF(x, y, w, h), d2d_brush->brush());
+ rt_->FillRectangle(RectToRectF(rect), d2d_brush->brush());
}
void CanvasDirect2D::DrawRectInt(const SkColor& color,
« no previous file with comments | « ui/gfx/canvas_direct2d.h ('k') | ui/gfx/canvas_direct2d_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698