summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/base/resource/resource_bundle.cc16
-rw-r--r--ui/resources/aura/wallpaper.jpgbin38522 -> 0 bytes
-rw-r--r--ui/resources/aura/wallpaper.pngbin0 -> 5992879 bytes
-rw-r--r--ui/resources/ui_resources.grd2
4 files changed, 6 insertions, 12 deletions
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index 66b3cf5..1b3e293 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() {
diff --git a/ui/resources/aura/wallpaper.jpg b/ui/resources/aura/wallpaper.jpg
deleted file mode 100644
index 2212eb3..0000000
--- a/ui/resources/aura/wallpaper.jpg
+++ /dev/null
Binary files differ
diff --git a/ui/resources/aura/wallpaper.png b/ui/resources/aura/wallpaper.png
new file mode 100644
index 0000000..12b237f
--- /dev/null
+++ b/ui/resources/aura/wallpaper.png
Binary files differ
diff --git a/ui/resources/ui_resources.grd b/ui/resources/ui_resources.grd
index cb372fd..37612c86 100644
--- a/ui/resources/ui_resources.grd
+++ b/ui/resources/ui_resources.grd
@@ -161,7 +161,7 @@
<include name="IDR_AURA_SHADOW_RECT_BOTTOM" file="aura/shadow_rect_bottom.png" type="BINDATA" />
<include name="IDR_AURA_SHADOW_RECT_BOTTOM_RIGHT" file="aura/shadow_rect_bottom_right.png" type="BINDATA" />
<include name="IDR_AURA_STATUS_MOCK" file="aura/statusbar.png" type="BINDATA" />
- <include name="IDR_AURA_WALLPAPER" file="aura/wallpaper.jpg" type="BINDATA" />
+ <include name="IDR_AURA_WALLPAPER" file="aura/wallpaper.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_CLOSE_ICON" file="aura/slab_close.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_BOTTOM_LEFT" file="aura/window_bottom_left.png" type="BINDATA" />
<include name="IDR_AURA_WINDOW_BOTTOM_RIGHT" file="aura/window_bottom_right.png" type="BINDATA" />