summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gears_integration.cc
diff options
context:
space:
mode:
authornick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-23 18:28:24 +0000
committernick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-23 18:28:24 +0000
commitaa310e9f8b2e3d5c8efc4ad977ee43e3e9349606 (patch)
tree3f89d116d7850b430c65fd5daabb86792956177e /chrome/browser/gears_integration.cc
parent569b1106f62d531c11f857f08961f41efe2b272e (diff)
downloadchromium_src-aa310e9f8b2e3d5c8efc4ad977ee43e3e9349606.zip
chromium_src-aa310e9f8b2e3d5c8efc4ad977ee43e3e9349606.tar.gz
chromium_src-aa310e9f8b2e3d5c8efc4ad977ee43e3e9349606.tar.bz2
Add a PNGEncoder helper function that takes an SkBitmap,
which is how PNGEncode is used almost everywhere. This should be strictly no functional change, except for the ImageFilterPeer::DataReady case, where we now take an SkAutoLockPixels where previously we did not. Review URL: http://codereview.chromium.org/18347 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8561 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gears_integration.cc')
-rwxr-xr-x[-rw-r--r--]chrome/browser/gears_integration.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/chrome/browser/gears_integration.cc b/chrome/browser/gears_integration.cc
index 580acba..0801cd6 100644..100755
--- a/chrome/browser/gears_integration.cc
+++ b/chrome/browser/gears_integration.cc
@@ -117,13 +117,7 @@ static GURL ConvertSkBitmapToDataURL(const SkBitmap& icon) {
// Get the FavIcon data.
std::vector<unsigned char> icon_data;
- {
- SkAutoLockPixels icon_lock(icon);
- PNGEncoder::Encode(static_cast<unsigned char*>(icon.getPixels()),
- PNGEncoder::FORMAT_BGRA, icon.width(),
- icon.height(), icon.width()* 4, false,
- &icon_data);
- }
+ PNGEncoder::EncodeBGRASkBitmap(icon, false, &icon_data);
// Base64-encode it (to make it a data URL).
std::string icon_data_str(reinterpret_cast<char*>(&icon_data[0]),