| OLD | NEW |
| 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 <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 | 11 |
| 12 #error "The GTK+ port will be deleted later this week. If you are seeing this, y
ou are trying to compile it. Please check your gyp flags for 'use_aura=0' and re
move them." |
| 13 |
| 12 namespace gfx { | 14 namespace gfx { |
| 13 | 15 |
| 14 GdkRegion* Path::CreateNativeRegion() const { | 16 GdkRegion* Path::CreateNativeRegion() const { |
| 15 int point_count = getPoints(NULL, 0); | 17 int point_count = getPoints(NULL, 0); |
| 16 if (point_count <= 1) { | 18 if (point_count <= 1) { |
| 17 // NOTE: ideally this would return gdk_empty_region, but that returns a | 19 // NOTE: ideally this would return gdk_empty_region, but that returns a |
| 18 // region with nothing in it. | 20 // region with nothing in it. |
| 19 return NULL; | 21 return NULL; |
| 20 } | 22 } |
| 21 | 23 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 46 } | 48 } |
| 47 | 49 |
| 48 // static | 50 // static |
| 49 NativeRegion Path::SubtractRegion(NativeRegion r1, NativeRegion r2) { | 51 NativeRegion Path::SubtractRegion(NativeRegion r1, NativeRegion r2) { |
| 50 GdkRegion* copy = gdk_region_copy(r1); | 52 GdkRegion* copy = gdk_region_copy(r1); |
| 51 gdk_region_subtract(copy, r2); | 53 gdk_region_subtract(copy, r2); |
| 52 return copy; | 54 return copy; |
| 53 } | 55 } |
| 54 | 56 |
| 55 } // namespace gfx | 57 } // namespace gfx |
| OLD | NEW |