Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5635)

Unified Diff: chrome/browser/browser_theme_provider.cc

Issue 243076: Move the JPEG and PNG codecs from base/gfx to app/gfx/codec. Move the classes... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/browser_theme_provider.cc
===================================================================
--- chrome/browser/browser_theme_provider.cc (revision 27832)
+++ chrome/browser/browser_theme_provider.cc (working copy)
@@ -4,10 +4,9 @@
#include "chrome/browser/browser_theme_provider.h"
+#include "app/gfx/codec/png_codec.h"
#include "app/gfx/skbitmap_operations.h"
#include "base/file_util.h"
-#include "base/gfx/png_decoder.h"
-#include "base/gfx/png_encoder.h"
#include "base/string_util.h"
#include "base/thread.h"
#include "base/values.h"
@@ -225,7 +224,7 @@
if (found != themed_image_cache_.end()) {
SkBitmap* bitmap = found->second;
std::vector<unsigned char> image_data;
- if (!PNGEncoder::EncodeBGRASkBitmap(*bitmap, false, &image_data)) {
+ if (!gfx::PNGCodec::EncodeBGRASkBitmap(*bitmap, false, &image_data)) {
NOTREACHED() << "Image file could not be encoded.";
return;
}
@@ -650,16 +649,16 @@
int image_width = 0;
int image_height = 0;
- if (!PNGDecoder::Decode(&raw_data.front(), raw_data.size(),
- PNGDecoder::FORMAT_BGRA, &png_data,
+ if (!gfx::PNGCodec::Decode(&raw_data.front(), raw_data.size(),
+ gfx::PNGCodec::FORMAT_BGRA, &png_data,
&image_width, &image_height)) {
NOTREACHED() << "Unable to decode theme image resource " << id;
return NULL;
}
- return PNGDecoder::CreateSkBitmapFromBGRAFormat(png_data,
- image_width,
- image_height);
+ return gfx::PNGCodec::CreateSkBitmapFromBGRAFormat(png_data,
+ image_width,
+ image_height);
} else {
// TODO(glen): File no-longer exists, we're out of date. We should
// clear the theme (or maybe just the pref that points to this

Powered by Google App Engine
This is Rietveld 408576698