| Index: ui/base/resource/resource_bundle.cc
|
| diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
|
| index 4fccb33824257f626090b6ec7b855f190be16587..82ac85b56989f709292d72eaca98f224aed65fcf 100644
|
| --- a/ui/base/resource/resource_bundle.cc
|
| +++ b/ui/base/resource/resource_bundle.cc
|
| @@ -122,15 +122,6 @@ class ResourceBundle::ResourceBundleImageSource : public gfx::ImageSkiaSource {
|
| skia::ImageOperations::RESIZE_LANCZOS3,
|
| gfx::ToCeiledInt(image.width() * scale),
|
| gfx::ToCeiledInt(image.height() * scale));
|
| - } else if (!unscaled) {
|
| - SkBitmap scaled_image =
|
| - PlatformScaleImage(image,
|
| - ui::GetScaleForScaleFactor(scale_factor),
|
| - scale);
|
| - if (scaled_image.isNull())
|
| - scale = GetScaleForScaleFactor(scale_factor);
|
| - else
|
| - image = scaled_image;
|
| } else {
|
| scale = GetScaleForScaleFactor(scale_factor);
|
| }
|
| @@ -359,15 +350,13 @@ gfx::Image& ResourceBundle::GetImageNamed(int resource_id) {
|
| ui::ScaleFactor scale_factor_to_load = ui::SCALE_FACTOR_100P;
|
| #endif
|
|
|
| - float scale = GetImageScale(scale_factor_to_load);
|
| -
|
| // TODO(oshima): Consider reading the image size from png IHDR chunk and
|
| // skip decoding here and remove #ifdef below.
|
| // ResourceBundle::GetSharedInstance() is destroyed after the
|
| // BrowserMainLoop has finished running. |image_skia| is guaranteed to be
|
| // destroyed before the resource bundle is destroyed.
|
| gfx::ImageSkia image_skia(new ResourceBundleImageSource(this, resource_id),
|
| - scale);
|
| + GetScaleForScaleFactor(scale_factor_to_load));
|
| if (image_skia.isNull()) {
|
| LOG(WARNING) << "Unable to load image with id " << resource_id;
|
| NOTREACHED(); // Want to assert in debug mode.
|
| @@ -813,13 +802,4 @@ bool ResourceBundle::DecodePNG(const unsigned char* buf,
|
| return gfx::PNGCodec::Decode(buf, size, bitmap);
|
| }
|
|
|
| -#if !defined(OS_WIN)
|
| -// static
|
| -SkBitmap ResourceBundle::PlatformScaleImage(const SkBitmap& image,
|
| - float loaded_image_scale,
|
| - float desired_scale) {
|
| - return SkBitmap();
|
| -}
|
| -#endif
|
| -
|
| } // namespace ui
|
|
|