| Index: ui/base/resource/resource_bundle.cc
|
| diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
|
| index 66b3cf51000169b01271ece565941218b8a47bdf..1b3e293687b57c06dcbfb9c9a007d2cbd3977892 100644
|
| --- a/ui/base/resource/resource_bundle.cc
|
| +++ b/ui/base/resource/resource_bundle.cc
|
| @@ -19,7 +19,6 @@
|
| #include "ui/base/resource/data_pack.h"
|
| #include "ui/base/ui_base_paths.h"
|
| #include "ui/base/ui_base_switches.h"
|
| -#include "ui/gfx/codec/jpeg_codec.h"
|
| #include "ui/gfx/codec/png_codec.h"
|
| #include "ui/gfx/font.h"
|
| #include "ui/gfx/image/image.h"
|
| @@ -370,17 +369,12 @@ SkBitmap* ResourceBundle::LoadBitmap(DataHandle data_handle, int resource_id) {
|
| return NULL;
|
|
|
| SkBitmap bitmap;
|
| - if (gfx::PNGCodec::Decode(memory->front(), memory->size(), &bitmap))
|
| - return new SkBitmap(bitmap);
|
| -
|
| - // 99% of our assets are PNGs, however fallback to JPEG.
|
| - SkBitmap* allocated_bitmap =
|
| - gfx::JPEGCodec::Decode(memory->front(), memory->size());
|
| - if (allocated_bitmap)
|
| - return allocated_bitmap;
|
| + if (!gfx::PNGCodec::Decode(memory->front(), memory->size(), &bitmap)) {
|
| + NOTREACHED() << "Unable to decode theme image resource " << resource_id;
|
| + return NULL;
|
| + }
|
|
|
| - NOTREACHED() << "Unable to decode theme image resource " << resource_id;
|
| - return NULL;
|
| + return new SkBitmap(bitmap);
|
| }
|
|
|
| gfx::Image* ResourceBundle::GetEmptyImage() {
|
|
|