diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-22 17:36:17 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-22 17:36:17 +0000 |
commit | 52d70a7c296f2eeef7343ed94375a7abad4a65dc (patch) | |
tree | 83f282358ee747ae897c440d781ade9d6a0730bc /chrome/browser/jumplist.cc | |
parent | 52bf465e9d660330d267d5b29c36fe3e9ce1d905 (diff) | |
download | chromium_src-52d70a7c296f2eeef7343ed94375a7abad4a65dc.zip chromium_src-52d70a7c296f2eeef7343ed94375a7abad4a65dc.tar.gz chromium_src-52d70a7c296f2eeef7343ed94375a7abad4a65dc.tar.bz2 |
Make PNGCodec::Decode(...) not make an intermediary copy of the decoded data;
instead have it write directly to the returned SkBitmap.
BUG=http://crbug.com/24493
TEST=Perf should get better. On the perf trybot, tab_complex_theme_cold got an average of ~40ms better.
Review URL: http://codereview.chromium.org/305001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29780 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/jumplist.cc')
-rw-r--r-- | chrome/browser/jumplist.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/jumplist.cc b/chrome/browser/jumplist.cc index 3dd2c55..1af060b 100644 --- a/chrome/browser/jumplist.cc +++ b/chrome/browser/jumplist.cc @@ -497,7 +497,9 @@ void JumpListUpdateTask::Run() { item != most_visited_pages_.end(); ++item) { SkBitmap icon_bitmap; if ((*item)->data().get() && - gfx::PNGCodec::Decode(&(*item)->data()->data, &icon_bitmap)) { + gfx::PNGCodec::Decode((*item)->data()->front(), + (*item)->data()->size(), + &icon_bitmap)) { std::wstring icon_path; if (CreateIconFile(icon_bitmap, icon_dir_, &icon_path)) (*item)->SetIcon(icon_path, 0, true); @@ -510,7 +512,9 @@ void JumpListUpdateTask::Run() { item != recently_closed_pages_.end(); ++item) { SkBitmap icon_bitmap; if ((*item)->data().get() && - gfx::PNGCodec::Decode(&(*item)->data()->data, &icon_bitmap)) { + gfx::PNGCodec::Decode((*item)->data()->front(), + (*item)->data()->size(), + &icon_bitmap)) { std::wstring icon_path; if (CreateIconFile(icon_bitmap, icon_dir_, &icon_path)) (*item)->SetIcon(icon_path, 0, true); |