summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authoryefim@chromium.org <yefim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-22 19:18:41 +0000
committeryefim@chromium.org <yefim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-22 19:18:41 +0000
commit3ea1e4aa8f511f4fbc4b5035f056178593658991 (patch)
tree4c878c8c873cacc0adb9a187b6f96dcb0b582b1d /ui
parent24adc441339b531e07a643c87a433b6fef3ee69a (diff)
downloadchromium_src-3ea1e4aa8f511f4fbc4b5035f056178593658991.zip
chromium_src-3ea1e4aa8f511f4fbc4b5035f056178593658991.tar.gz
chromium_src-3ea1e4aa8f511f4fbc4b5035f056178593658991.tar.bz2
Fixed Aura version of Path::CreateNativeRegion().
It was passing an empty region into region->setPath(path, clip_region) and as a result output region was always empty. BUG= Review URL: https://chromiumcodereview.appspot.com/11411135 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169295 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/gfx/path_aura.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/ui/gfx/path_aura.cc b/ui/gfx/path_aura.cc
index 9ca857d..cc68458 100644
--- a/ui/gfx/path_aura.cc
+++ b/ui/gfx/path_aura.cc
@@ -10,8 +10,15 @@
namespace gfx {
SkRegion* Path::CreateNativeRegion() const {
+ // Create a clip region that contains |this| path.
+ const SkRect bounds = getBounds();
+ SkIRect ibounds;
+ bounds.round(&ibounds);
+ SkRegion clip_region;
+ clip_region.setRect(ibounds);
+
SkRegion* region = new SkRegion;
- region->setPath(*this, *region);
+ region->setPath(*this, clip_region);
return region;
}