| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/gfx/path.h" |
| 6 |
| 7 #include "third_party/skia/include/core/SkRegion.h" |
| 8 |
| 9 namespace gfx { |
| 10 |
| 11 SkRegion* Path::CreateNativeRegion() const { |
| 12 return new SkRegion; |
| 13 } |
| 14 |
| 15 // static |
| 16 NativeRegion Path::IntersectRegions(NativeRegion r1, NativeRegion r2) { |
| 17 SkRegion* new_region = new SkRegion; |
| 18 new_region->op(*r1, *r2, SkRegion::kIntersect_Op); |
| 19 return new_region; |
| 20 } |
| 21 |
| 22 // static |
| 23 NativeRegion Path::CombineRegions(NativeRegion r1, NativeRegion r2) { |
| 24 SkRegion* new_region = new SkRegion; |
| 25 new_region->op(*r1, *r2, SkRegion::kUnion_Op); |
| 26 return new_region; |
| 27 } |
| 28 |
| 29 // static |
| 30 NativeRegion Path::SubtractRegion(NativeRegion r1, NativeRegion r2) { |
| 31 SkRegion* new_region = new SkRegion; |
| 32 new_region->op(*r1, *r2, SkRegion::kDifference_Op); |
| 33 return new_region; |
| 34 } |
| 35 |
| 36 } // namespace gfx |
| OLD | NEW |