diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-03 03:12:20 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-03 03:12:20 +0000 |
commit | 468fec96cd171682405d30b266f71f1766396a07 (patch) | |
tree | e3dc28717fa79c7149303d1c9ec6bb8437edfbcc /chrome/browser/webdata | |
parent | db1faced81ea15604ca67135c5597d35269ff84a (diff) | |
download | chromium_src-468fec96cd171682405d30b266f71f1766396a07.zip chromium_src-468fec96cd171682405d30b266f71f1766396a07.tar.gz chromium_src-468fec96cd171682405d30b266f71f1766396a07.tar.bz2 |
Move the JPEG and PNG codecs from base/gfx to app/gfx/codec. Move the classes
into the gfx namespace.
Combine the PNGEncoder and PNGDecoder. There were separate when we had
different executables for the browser and renderer, and linked the encoder only
in one of them (which saved us some space used by libpng). This hasn't been the
case for years, so combining them (again) makes sense.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/243076
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27930 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/webdata')
-rw-r--r-- | chrome/browser/webdata/web_database.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/browser/webdata/web_database.cc b/chrome/browser/webdata/web_database.cc index a4db1c9..e796979 100644 --- a/chrome/browser/webdata/web_database.cc +++ b/chrome/browser/webdata/web_database.cc @@ -8,11 +8,10 @@ #include <limits> #include <vector> +#include "app/gfx/codec/png_codec.h" #include "app/l10n_util.h" #include "app/sql/statement.h" #include "app/sql/transaction.h" -#include "base/gfx/png_decoder.h" -#include "base/gfx/png_encoder.h" #include "base/string_util.h" #include "base/time.h" #include "chrome/browser/history/history_database.h" @@ -187,7 +186,7 @@ bool WebDatabase::SetWebAppImage(const GURL& url, const SkBitmap& image) { return false; std::vector<unsigned char> image_data; - PNGEncoder::EncodeBGRASkBitmap(image, false, &image_data); + gfx::PNGCodec::EncodeBGRASkBitmap(image, false, &image_data); s.BindString(0, history::HistoryDatabase::GURLToDatabaseURL(url)); s.BindInt(1, image.width()); @@ -212,7 +211,7 @@ bool WebDatabase::GetWebAppImages(const GURL& url, if (col_bytes > 0) { image_data.resize(col_bytes); memcpy(&image_data[0], s.ColumnBlob(0), col_bytes); - if (PNGDecoder::Decode(&image_data, &image)) { + if (gfx::PNGCodec::Decode(&image_data, &image)) { images->push_back(image); } else { // Should only have valid image data in the db. |