From 90610762cb7f004ad28dde9b9763714bf95731d7 Mon Sep 17 00:00:00 2001 From: "xiyuan@chromium.org" Date: Thu, 17 Dec 2009 19:02:57 +0000 Subject: Init allocated SkBitmap pixels Init allocated pixels to ARGB(0,0,0,0) in CreateSkBitmapFromHICON per issue 30584. BUG=30584 TEST=wine-valgrind should no longer complain as in issue 30584. Review URL: http://codereview.chromium.org/504035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34852 0039d316-1c4b-4281-b951-d872f2087c98 --- app/gfx/icon_util.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'app') diff --git a/app/gfx/icon_util.cc b/app/gfx/icon_util.cc index 4134c90..ae77b43 100644 --- a/app/gfx/icon_util.cc +++ b/app/gfx/icon_util.cc @@ -115,6 +115,7 @@ SkBitmap* IconUtil::CreateSkBitmapFromHICON(HICON icon, const gfx::Size& s) { DCHECK(bitmap); bitmap->setConfig(SkBitmap::kARGB_8888_Config, s.width(), s.height()); bitmap->allocPixels(); + bitmap->eraseARGB(0, 0, 0, 0); SkAutoLockPixels bitmap_lock(*bitmap); // Now we should create a DIB so that we can use ::DrawIconEx in order to -- cgit v1.1