summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-17 19:02:57 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-17 19:02:57 +0000
commit90610762cb7f004ad28dde9b9763714bf95731d7 (patch)
treecdcf6cd9b87d7ab828fb25c3813e2b86317f7ce9
parent38178a40098824ecafd6d81e9f19631acaf37c75 (diff)
downloadchromium_src-90610762cb7f004ad28dde9b9763714bf95731d7.zip
chromium_src-90610762cb7f004ad28dde9b9763714bf95731d7.tar.gz
chromium_src-90610762cb7f004ad28dde9b9763714bf95731d7.tar.bz2
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
-rw-r--r--app/gfx/icon_util.cc1
1 files changed, 1 insertions, 0 deletions
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