From 468fec96cd171682405d30b266f71f1766396a07 Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Sat, 3 Oct 2009 03:12:20 +0000 Subject: 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 --- chrome/browser/views/options/general_page_view.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'chrome/browser/views/options') diff --git a/chrome/browser/views/options/general_page_view.cc b/chrome/browser/views/options/general_page_view.cc index 94fb959..e7f9b37 100644 --- a/chrome/browser/views/options/general_page_view.cc +++ b/chrome/browser/views/options/general_page_view.cc @@ -5,9 +5,9 @@ #include "chrome/browser/views/options/general_page_view.h" #include "app/combobox_model.h" +#include "app/gfx/codec/png_codec.h" #include "app/l10n_util.h" #include "app/resource_bundle.h" -#include "base/gfx/png_decoder.h" #include "base/message_loop.h" #include "base/string_util.h" #include "chrome/browser/browser.h" @@ -239,9 +239,10 @@ void CustomHomePagesTableModel::OnGotFavIcon( if (know_fav_icon && image_data.get() && !image_data->data.empty()) { int width, height; std::vector decoded_data; - if (PNGDecoder::Decode(&image_data->data.front(), image_data->data.size(), - PNGDecoder::FORMAT_BGRA, &decoded_data, &width, - &height)) { + if (gfx::PNGCodec::Decode(&image_data->data.front(), + image_data->data.size(), + gfx::PNGCodec::FORMAT_BGRA, &decoded_data, + &width, &height)) { entry->icon.setConfig(SkBitmap::kARGB_8888_Config, width, height); entry->icon.allocPixels(); memcpy(entry->icon.getPixels(), &decoded_data.front(), -- cgit v1.1