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

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

Issue 11301007: Load the resources for max scale factor first. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
Index: ui/base/resource/resource_bundle.h
diff --git a/ui/base/resource/resource_bundle.h b/ui/base/resource/resource_bundle.h
index d61d729bba44278dc3fe473d2020c2780036c7ff..b2863cd59a0c19f76164fb13cd2a47e54fc67024 100644
--- a/ui/base/resource/resource_bundle.h
+++ b/ui/base/resource/resource_bundle.h
@@ -266,6 +266,7 @@ class UI_EXPORT ResourceBundle {
FRIEND_TEST_ALL_PREFIXES(ResourceBundle, LoadDataResourceBytes);
FRIEND_TEST_ALL_PREFIXES(ResourceBundle, LocaleDataPakExists);
FRIEND_TEST_ALL_PREFIXES(ResourceBundle, GetImageNamed);
+ FRIEND_TEST_ALL_PREFIXES(ResourceBundle, FallbackToNone);
pkotwicz 2012/11/07 06:40:44 Nit: When you rebase, you will probably find this
oshima 2012/11/07 22:35:30 Done.
class ResourceBundleImageSource;
friend class ResourceBundleImageSource;
@@ -316,9 +317,11 @@ class UI_EXPORT ResourceBundle {
bool* fell_back_to_1x) const;
// Fills the |bitmap| given the |resource_id| and |scale_factor|.
- // Returns false if the resource does not exist.
+ // Returns false if the resource does not exist. This may fall back to
+ // the data pack with SCALE_FACTOR_NONE, and when this happens,
+ // |scale_factor| will be set to SCALE_FACTOR_100P.
bool LoadBitmap(int resource_id,
- ScaleFactor scale_factor,
+ ScaleFactor* scale_factor,
SkBitmap* bitmap,
bool* fell_back_to_1x) const;

Powered by Google App Engine
This is Rietveld 408576698