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 /app/resource_bundle.cc | |
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 'app/resource_bundle.cc')
-rw-r--r-- | app/resource_bundle.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/resource_bundle.cc b/app/resource_bundle.cc index c930fa3..a108660 100644 --- a/app/resource_bundle.cc +++ b/app/resource_bundle.cc @@ -4,8 +4,8 @@ #include "app/resource_bundle.h" +#include "app/gfx/codec/png_codec.h" #include "app/gfx/font.h" -#include "base/gfx/png_decoder.h" #include "base/logging.h" #include "base/string_piece.h" #include "net/base/file_stream.h" @@ -80,16 +80,16 @@ SkBitmap* ResourceBundle::LoadBitmap(DataHandle data_handle, int resource_id) { // Decode the PNG. int image_width; int image_height; - if (!PNGDecoder::Decode(&raw_data.front(), raw_data.size(), - PNGDecoder::FORMAT_BGRA, - &png_data, &image_width, &image_height)) { + if (!gfx::PNGCodec::Decode(&raw_data.front(), raw_data.size(), + gfx::PNGCodec::FORMAT_BGRA, + &png_data, &image_width, &image_height)) { NOTREACHED() << "Unable to decode image resource " << resource_id; return NULL; } - return PNGDecoder::CreateSkBitmapFromBGRAFormat(png_data, - image_width, - image_height); + return gfx::PNGCodec::CreateSkBitmapFromBGRAFormat(png_data, + image_width, + image_height); } std::string ResourceBundle::GetDataResource(int resource_id) { |