diff options
author | nick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-23 18:28:24 +0000 |
---|---|---|
committer | nick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-23 18:28:24 +0000 |
commit | aa310e9f8b2e3d5c8efc4ad977ee43e3e9349606 (patch) | |
tree | 3f89d116d7850b430c65fd5daabb86792956177e /chrome/browser/webdata | |
parent | 569b1106f62d531c11f857f08961f41efe2b272e (diff) | |
download | chromium_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/webdata')
-rwxr-xr-x[-rw-r--r--] | chrome/browser/webdata/web_database.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/chrome/browser/webdata/web_database.cc b/chrome/browser/webdata/web_database.cc index af78244..83fa217 100644..100755 --- 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()); |