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

Unified Diff: ui/gfx/skia_util.cc

Issue 11410025: ui: Add SkIRectToRect() function to convert from SkIRect type to gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/skia_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/skia_util.cc
diff --git a/ui/gfx/skia_util.cc b/ui/gfx/skia_util.cc
index f5d51eae5c4d6f252bf8f4baf9cd5447d332f2d0..af108daf4b08f5e2641a170b1b018a6bb597fd07 100644
--- a/ui/gfx/skia_util.cc
+++ b/ui/gfx/skia_util.cc
@@ -18,21 +18,25 @@
namespace gfx {
-SkRect RectToSkRect(const gfx::Rect& rect) {
+SkRect RectToSkRect(const Rect& rect) {
SkRect r;
r.iset(rect.x(), rect.y(), rect.right(), rect.bottom());
return r;
}
-SkIRect RectToSkIRect(const gfx::Rect& rect) {
+SkIRect RectToSkIRect(const Rect& rect) {
return SkIRect::MakeXYWH(rect.x(), rect.y(), rect.width(), rect.height());
}
-gfx::Rect SkRectToRect(const SkRect& rect) {
- return gfx::Rect(static_cast<int>(rect.left()),
- static_cast<int>(rect.top()),
- static_cast<int>(rect.width()),
- static_cast<int>(rect.height()));
+Rect SkRectToRect(const SkRect& rect) {
+ return Rect(static_cast<int>(rect.left()),
+ static_cast<int>(rect.top()),
+ static_cast<int>(rect.width()),
+ static_cast<int>(rect.height()));
+}
+
+Rect SkIRectToRect(const SkIRect& rect) {
+ return Rect(rect.x(), rect.y(), rect.width(), rect.height());
}
SkShader* CreateImageRepShader(const gfx::ImageSkiaRep& image_rep,
« no previous file with comments | « ui/gfx/skia_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698