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

Unified Diff: ui/gfx/path_win.cc

Issue 1406403007: Eliminate HICON leaks caused by creating icons from bitmap image. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use ScopedGeneric to define ScopedGDIObject. Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: ui/gfx/path_win.cc
diff --git a/ui/gfx/path_win.cc b/ui/gfx/path_win.cc
index e6a915b3306968b8133475aa68d16a613d8a2545..72f5191ccdf0e5e92d64efdd9c5dfe6daa18fada 100644
--- a/ui/gfx/path_win.cc
+++ b/ui/gfx/path_win.cc
@@ -17,8 +17,9 @@ HRGN CreateHRGNFromSkRegion(const SkRegion& region) {
for (SkRegion::Iterator i(region); !i.done(); i.next()) {
const SkIRect& rect = i.rect();
- ::SetRectRgn(temp, rect.left(), rect.top(), rect.right(), rect.bottom());
- ::CombineRgn(result, result, temp, RGN_OR);
+ ::SetRectRgn(temp.get(),
+ rect.left(), rect.top(), rect.right(), rect.bottom());
+ ::CombineRgn(result.get(), result.get(), temp.get(), RGN_OR);
}
return result.release();
« ui/gfx/icon_util.cc ('K') | « ui/gfx/icon_util.cc ('k') | ui/gfx/platform_font_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698