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

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

Issue 11028064: Resize images for hi-dpi based on a custom PNG chunk added by GRIT r78, and roll GRIT r78 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: back out libpng/PNGCodec changes, scan for special chunks by hand (and rebase) Created 8 years, 2 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/base/resource/resource_bundle.cc » ('j') | ui/base/resource/resource_bundle.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle.h
diff --git a/ui/base/resource/resource_bundle.h b/ui/base/resource/resource_bundle.h
index 66e5790a1c55d3afb29d08bafbd7bdc8ab88fe02..a817b97da61b0848bb62e09c2da8caa5dc27b67e 100644
--- a/ui/base/resource/resource_bundle.h
+++ b/ui/base/resource/resource_bundle.h
@@ -285,14 +285,23 @@ class UI_EXPORT ResourceBundle {
// Initialize all the gfx::Font members if they haven't yet been initialized.
void LoadFontsIfNecessary();
- // Creates and returns a new SkBitmap given the data file to look in and the
- // |resource_id|. It's up to the caller to free the returned bitmap when
- // done.
- SkBitmap* LoadBitmap(const ResourceHandle& dll_inst, int resource_id) const;
-
- // Creates and returns a new SkBitmap for |resource_id| and |scale_factor|.
- // Returns NULL if the resource does not exist.
- SkBitmap* LoadBitmap(int resource_id, ScaleFactor scale_factor) const;
+ // Fills the |bitmap| given the data file to look in and the |resource_id|.
+ // Returns false if the resource does not exist.
+ //
+ // If the call succeeds and |fell_back_to_1x| is not NULL, it is set to true
oshima 2012/10/16 23:12:09 fell_back_to_1x must not be NULL now, correct?
benrg 2012/10/17 15:57:25 Fixed.
+ // if Chrome's custom csCl PNG chunk is present (indicating that GRIT fell
+ // back to the 100% image), false if not.
+ bool LoadBitmap(const ResourceHandle& data_handle,
+ int resource_id,
+ SkBitmap* bitmap,
+ bool* fell_back_to_1x) const;
+
+ // Fills the |bitmap| given the |resource_id| and |scale_factor|.
+ // Returns false if the resource does not exist.
+ bool LoadBitmap(int resource_id,
+ ScaleFactor scale_factor,
+ SkBitmap* bitmap,
+ bool* fell_back_to_1x) const;
// Returns an empty image for when a resource cannot be loaded. This is a
// bright red bitmap.
« no previous file with comments | « no previous file | ui/base/resource/resource_bundle.cc » ('j') | ui/base/resource/resource_bundle.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698