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

Unified Diff: chrome/browser/webdata/web_database.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 | « chrome/browser/importer/importer.cc ('k') | chrome/common/security_filter_peer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/webdata/web_database.cc
diff --git a/chrome/browser/webdata/web_database.cc b/chrome/browser/webdata/web_database.cc
old mode 100644
new mode 100755
index af78244326e29bfc5332e75ff82270d9f6adc3bd..83fa217cd32d5085f9cd55ef05baf2e4c2be99f7
--- a/chrome/browser/webdata/web_database.cc
+++ b/chrome/browser/webdata/web_database.cc
@@ -201,11 +201,7 @@ bool WebDatabase::SetWebAppImage(const GURL& url,
}
std::vector<unsigned char> image_data;
-
- SkAutoLockPixels pixel_lock(image);
- PNGEncoder::Encode(reinterpret_cast<unsigned char*>(image.getPixels()),
- PNGEncoder::FORMAT_BGRA, image.width(),
- image.height(), image.width() * 4, false, &image_data);
+ PNGEncoder::EncodeBGRASkBitmap(image, false, &image_data);
s.bind_string(0, history::HistoryDatabase::GURLToDatabaseURL(url));
s.bind_int(1, image.width());
« no previous file with comments | « chrome/browser/importer/importer.cc ('k') | chrome/common/security_filter_peer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698