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

Side by Side Diff: ui/gfx/canvas_skia.cc

Issue 8363036: ui/gfx: Change Canvas::ScaleInt() to just Canvas::Scale(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address Peter's review Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/canvas_skia.h ('k') | views/controls/menu/menu_image_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gfx/canvas_skia.h" 5 #include "ui/gfx/canvas_skia.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 112
113 bool CanvasSkia::ClipRect(const gfx::Rect& rect) { 113 bool CanvasSkia::ClipRect(const gfx::Rect& rect) {
114 return canvas_->clipRect(gfx::RectToSkRect(rect)); 114 return canvas_->clipRect(gfx::RectToSkRect(rect));
115 } 115 }
116 116
117 void CanvasSkia::Translate(const gfx::Point& point) { 117 void CanvasSkia::Translate(const gfx::Point& point) {
118 canvas_->translate(SkIntToScalar(point.x()), SkIntToScalar(point.y())); 118 canvas_->translate(SkIntToScalar(point.x()), SkIntToScalar(point.y()));
119 } 119 }
120 120
121 void CanvasSkia::ScaleInt(int x, int y) { 121 void CanvasSkia::Scale(int x_scale, int y_scale) {
122 canvas_->scale(SkIntToScalar(x), SkIntToScalar(y)); 122 canvas_->scale(SkIntToScalar(x_scale), SkIntToScalar(y_scale));
123 } 123 }
124 124
125 void CanvasSkia::FillRectInt(const SkColor& color, int x, int y, int w, int h) { 125 void CanvasSkia::FillRectInt(const SkColor& color, int x, int y, int w, int h) {
126 FillRectInt(color, x, y, w, h, SkXfermode::kSrcOver_Mode); 126 FillRectInt(color, x, y, w, h, SkXfermode::kSrcOver_Mode);
127 } 127 }
128 128
129 void CanvasSkia::FillRectInt(const SkColor& color, 129 void CanvasSkia::FillRectInt(const SkColor& color,
130 int x, int y, int w, int h, 130 int x, int y, int w, int h,
131 SkXfermode::Mode mode) { 131 SkXfermode::Mode mode) {
132 SkPaint paint; 132 SkPaint paint;
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 413
414 CanvasPaint* CanvasPaint::CreateCanvasPaint(gfx::NativeView view) { 414 CanvasPaint* CanvasPaint::CreateCanvasPaint(gfx::NativeView view) {
415 #if defined(OS_WIN) && !defined(USE_AURA) 415 #if defined(OS_WIN) && !defined(USE_AURA)
416 return new CanvasPaintWin(view); 416 return new CanvasPaintWin(view);
417 #else 417 #else
418 return NULL; 418 return NULL;
419 #endif 419 #endif
420 } 420 }
421 421
422 } // namespace gfx 422 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/canvas_skia.h ('k') | views/controls/menu/menu_image_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698