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

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

Issue 122443005: replace deprecated SkScalarRound/Floor/Ceil calls with more explicit variants (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/path_win.cc ('k') | ui/gfx/platform_font_pango.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/path_x11.h" 5 #include "ui/gfx/path_x11.h"
6 6
7 #include <X11/Xutil.h> 7 #include <X11/Xutil.h>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "third_party/skia/include/core/SkRegion.h" 10 #include "third_party/skia/include/core/SkRegion.h"
(...skipping 15 matching lines...) Expand all
26 26
27 return result; 27 return result;
28 } 28 }
29 29
30 Region CreateRegionFromSkPath(const SkPath& path) { 30 Region CreateRegionFromSkPath(const SkPath& path) {
31 int point_count = path.getPoints(NULL, 0); 31 int point_count = path.getPoints(NULL, 0);
32 scoped_ptr<SkPoint[]> points(new SkPoint[point_count]); 32 scoped_ptr<SkPoint[]> points(new SkPoint[point_count]);
33 path.getPoints(points.get(), point_count); 33 path.getPoints(points.get(), point_count);
34 scoped_ptr<XPoint[]> x11_points(new XPoint[point_count]); 34 scoped_ptr<XPoint[]> x11_points(new XPoint[point_count]);
35 for (int i = 0; i < point_count; ++i) { 35 for (int i = 0; i < point_count; ++i) {
36 x11_points[i].x = SkScalarRound(points[i].fX); 36 x11_points[i].x = SkScalarRoundToInt(points[i].fX);
37 x11_points[i].y = SkScalarRound(points[i].fY); 37 x11_points[i].y = SkScalarRoundToInt(points[i].fY);
38 } 38 }
39 39
40 return XPolygonRegion(x11_points.get(), point_count, EvenOddRule); 40 return XPolygonRegion(x11_points.get(), point_count, EvenOddRule);
41 } 41 }
42 42
43 } // namespace gfx 43 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/path_win.cc ('k') | ui/gfx/platform_font_pango.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698