Add CreateHRGNFromSkRegion and update DesktopRootWindowHostWin to use it.
SkRegion can now be converted directly to HRGN, rather than via SkPath, thereby avoiding the lack of support for non-contiguous regions in the SkPath to HRGN conversion step.
This CL is deliberately a minimal fix, suitable for merging.
BUG=315236
Review URL: https://codereview.chromium.org/61603004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233795 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ui/gfx/path_win.h b/ui/gfx/path_win.h
index cc471e8..317a6fb07 100644
--- a/ui/gfx/path_win.h
+++ b/ui/gfx/path_win.h
@@ -10,9 +10,14 @@
#include "ui/gfx/gfx_export.h"
class SkPath;
+class SkRegion;
namespace gfx {
+// Creates a new HRGN given |region|. The caller is responsible for destroying
+// the returned region.
+GFX_EXPORT HRGN CreateHRGNFromSkRegion(const SkRegion& path);
+
// Creates a new HRGN given |path|. The caller is responsible for destroying
// the returned region.
GFX_EXPORT HRGN CreateHRGNFromSkPath(const SkPath& path);