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

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

Issue 854713003: More old files deletion. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix tryjobs? Created 5 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
« no previous file with comments | « ui/gfx/path.cc ('k') | ui/gfx/path_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/gfx/path.h"
6
7 #include "base/memory/scoped_ptr.h"
8 #include "third_party/skia/include/core/SkRegion.h"
9
10 namespace gfx {
11
12 SkRegion* Path::CreateNativeRegion() const {
13 // Create a clip region that contains |this| path.
14 const SkRect bounds = getBounds();
15 SkIRect ibounds;
16 bounds.round(&ibounds);
17 SkRegion clip_region;
18 clip_region.setRect(ibounds);
19
20 SkRegion* region = new SkRegion;
21 region->setPath(*this, clip_region);
22 return region;
23 }
24
25 // static
26 NativeRegion Path::IntersectRegions(NativeRegion r1, NativeRegion r2) {
27 SkRegion* new_region = new SkRegion;
28 new_region->op(*r1, *r2, SkRegion::kIntersect_Op);
29 return new_region;
30 }
31
32 // static
33 NativeRegion Path::CombineRegions(NativeRegion r1, NativeRegion r2) {
34 SkRegion* new_region = new SkRegion;
35 new_region->op(*r1, *r2, SkRegion::kUnion_Op);
36 return new_region;
37 }
38
39 // static
40 NativeRegion Path::SubtractRegion(NativeRegion r1, NativeRegion r2) {
41 SkRegion* new_region = new SkRegion;
42 new_region->op(*r1, *r2, SkRegion::kDifference_Op);
43 return new_region;
44 }
45
46 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/path.cc ('k') | ui/gfx/path_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698