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

Unified Diff: chrome/browser/fav_icon_helper.cc

Issue 18347: Add a PNGEncoder helper function that takes an SkBitmap, (Closed)
Patch Set: Test2 Created 11 years, 11 months 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
« no previous file with comments | « base/gfx/png_encoder.cc ('k') | chrome/browser/gears_integration.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/fav_icon_helper.cc
diff --git a/chrome/browser/fav_icon_helper.cc b/chrome/browser/fav_icon_helper.cc
old mode 100644
new mode 100755
index 2f5bd97d23d859481b7e44436fa1c4f1096597b5..94032b156cbc3b86ffc5eb66c8f7ab8245bf2024
--- a/chrome/browser/fav_icon_helper.cc
+++ b/chrome/browser/fav_icon_helper.cc
@@ -84,12 +84,7 @@ void FavIconHelper::SetFavIcon(
if (GetHistoryService() && !profile()->IsOffTheRecord()) {
std::vector<unsigned char> image_data;
- SkAutoLockPixels icon_lock(sized_image);
- PNGEncoder::Encode(
- reinterpret_cast<unsigned char*>(sized_image.getPixels()),
- PNGEncoder::FORMAT_BGRA, sized_image.width(),
- sized_image.height(), sized_image.width()* 4, false,
- &image_data);
+ PNGEncoder::EncodeBGRASkBitmap(sized_image, false, &image_data);
GetHistoryService()->SetFavIcon(i->second.url, i->second.fav_icon_url,
image_data);
}
« no previous file with comments | « base/gfx/png_encoder.cc ('k') | chrome/browser/gears_integration.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698