Chromium Code Reviews| Index: ui/base/resource/resource_bundle.cc |
| diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc |
| index f84e8dbb8d432f03040d2a7ef4e472c06ce51c10..ed0bab93da22fa302d4a5d365d1457f6312b27d0 100644 |
| --- a/ui/base/resource/resource_bundle.cc |
| +++ b/ui/base/resource/resource_bundle.cc |
| @@ -26,6 +26,10 @@ |
| #include "ui/gfx/codec/png_codec.h" |
| #include "ui/gfx/image/image_skia.h" |
| +#if defined(USE_AURA) |
| +#include "ui/compositor/dip_util.h" |
| +#endif |
| + |
| namespace ui { |
| namespace { |
| @@ -236,11 +240,12 @@ gfx::Image& ResourceBundle::GetImageNamed(int resource_id) { |
| for (size_t i = 0; i < data_packs_.size(); ++i) { |
| scoped_ptr<SkBitmap> bitmap(LoadBitmap(*data_packs_[i], resource_id)); |
| if (bitmap.get()) { |
| -#if defined(ENABLE_DIP) |
| - image_skia.AddBitmapForScale(*bitmap, data_packs_[i]->GetScaleFactor()); |
| -#else |
| - image_skia.AddBitmapForScale(*bitmap, 1.0f); |
| + float image_scale_factor = 1.0f; |
| +#if defined(USE_AURA) |
| + if (ui::IsDIPEnabled()) |
|
sky
2012/05/14 14:09:58
Can we define this for all platforms so that we do
|
| + image_scale_factor = data_packs_[i]->GetScaleFactor(); |
| #endif |
| + image_skia.AddBitmapForScale(*bitmap, image_scale_factor); |
| } |
| } |