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

Unified Diff: ui/gfx/codec/png_codec.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: code adapted from issue 10914092 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
Index: ui/gfx/codec/png_codec.h
diff --git a/ui/gfx/codec/png_codec.h b/ui/gfx/codec/png_codec.h
index 3a6d295dbdf45a1e3d77d1711f7474bc190918c6..c24e20d73ba584b30f17e9a097c7cbb4343eddad 100644
--- a/ui/gfx/codec/png_codec.h
+++ b/ui/gfx/codec/png_codec.h
@@ -115,9 +115,16 @@ class UI_EXPORT PNGCodec {
// images are. (There are a lot of themes that have a NTP image of about ~1
// megabyte, and those require a 7-10 megabyte side buffer.)
//
+ // If |scale_fallback| is not NULL, it is set to true if a csCl chunk is
+ // present in the image, false if not.
+ //
// Returns true if data is non-null and can be decoded as a png, false
// otherwise.
static bool Decode(const unsigned char* input, size_t input_size,
+ SkBitmap* bitmap, bool* scale_fallback);
+
+ // Most clients don't need the |scale_fallback| argument.
oshima 2012/10/09 18:28:35 // Same as Decode above, but scale_fallback is NUL
benrg 2012/10/09 21:37:18 Done.
+ static bool Decode(const unsigned char* input, size_t input_size,
SkBitmap* bitmap);
// Create a SkBitmap from a decoded BGRA DIB. The caller owns the returned

Powered by Google App Engine
This is Rietveld 408576698