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

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

Issue 10662037: basic nc paint, moving, resizing for views_examples_exe on win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: GetHwnd->hwnd Created 8 years, 5 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/gdi_util.cc ('k') | ui/views/widget/desktop_native_widget_helper_aura.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/path.h" 5 #include "ui/gfx/path.h"
6 6
7 #include "base/memory/scoped_ptr.h"
7 #include "third_party/skia/include/core/SkRegion.h" 8 #include "third_party/skia/include/core/SkRegion.h"
8 9
9 namespace gfx { 10 namespace gfx {
10 11
11 SkRegion* Path::CreateNativeRegion() const { 12 SkRegion* Path::CreateNativeRegion() const {
12 return new SkRegion; 13 SkRegion* region = new SkRegion;
14 region->setPath(*this, *region);
15 return region;
13 } 16 }
14 17
15 // static 18 // static
16 NativeRegion Path::IntersectRegions(NativeRegion r1, NativeRegion r2) { 19 NativeRegion Path::IntersectRegions(NativeRegion r1, NativeRegion r2) {
17 SkRegion* new_region = new SkRegion; 20 SkRegion* new_region = new SkRegion;
18 new_region->op(*r1, *r2, SkRegion::kIntersect_Op); 21 new_region->op(*r1, *r2, SkRegion::kIntersect_Op);
19 return new_region; 22 return new_region;
20 } 23 }
21 24
22 // static 25 // static
23 NativeRegion Path::CombineRegions(NativeRegion r1, NativeRegion r2) { 26 NativeRegion Path::CombineRegions(NativeRegion r1, NativeRegion r2) {
24 SkRegion* new_region = new SkRegion; 27 SkRegion* new_region = new SkRegion;
25 new_region->op(*r1, *r2, SkRegion::kUnion_Op); 28 new_region->op(*r1, *r2, SkRegion::kUnion_Op);
26 return new_region; 29 return new_region;
27 } 30 }
28 31
29 // static 32 // static
30 NativeRegion Path::SubtractRegion(NativeRegion r1, NativeRegion r2) { 33 NativeRegion Path::SubtractRegion(NativeRegion r1, NativeRegion r2) {
31 SkRegion* new_region = new SkRegion; 34 SkRegion* new_region = new SkRegion;
32 new_region->op(*r1, *r2, SkRegion::kDifference_Op); 35 new_region->op(*r1, *r2, SkRegion::kDifference_Op);
33 return new_region; 36 return new_region;
34 } 37 }
35 38
36 } // namespace gfx 39 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/gdi_util.cc ('k') | ui/views/widget/desktop_native_widget_helper_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698