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

Unified Diff: ui/base/resource/resource_bundle.cc

Issue 10389109: Add gfx::Screen::IsEnabled() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Decided that the original approach with gfx::Sceren::IsDIPEnabled is better than the ifdef Created 8 years, 7 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
« no previous file with comments | « no previous file | ui/gfx/screen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle.cc
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index c5fa973c8f4392650383e57c8aef7691a282092f..524abaf8245302ab058d35884e1dd4c71f9fd490 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -25,6 +25,7 @@
#include "ui/gfx/codec/jpeg_codec.h"
#include "ui/gfx/codec/png_codec.h"
#include "ui/gfx/image/image_skia.h"
+#include "ui/gfx/screen.h"
namespace ui {
@@ -236,11 +237,11 @@ 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(USE_AURA)
- image_skia.AddBitmapForScale(*bitmap, data_packs_[i]->GetScaleFactor());
-#else
- image_skia.AddBitmapForScale(*bitmap, 1.0f);
-#endif
+ if (gfx::Screen::IsDIPEnabled())
+ image_skia.AddBitmapForScale(*bitmap,
+ data_packs_[i]->GetScaleFactor());
+ else
+ image_skia.AddBitmapForScale(*bitmap, 1.0f);
}
}
« no previous file with comments | « no previous file | ui/gfx/screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698