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

Unified Diff: ui/gfx/image/image_skia.h

Issue 2665623002: Fix Jumplist favicons to have high resolution in HDPI Windows displays (Closed)
Patch Set: Update comments and remove redundant .h files. Created 3 years, 11 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/image/image_skia.h
diff --git a/ui/gfx/image/image_skia.h b/ui/gfx/image/image_skia.h
index db7447d986c08a497371523456e372544a5d21be..f3e1bf8fb62981a1621a3c6ac89b0a880d55d2f6 100644
--- a/ui/gfx/image/image_skia.h
+++ b/ui/gfx/image/image_skia.h
@@ -140,6 +140,10 @@ class GFX_EXPORT ImageSkia {
// TODO(pkotwicz): Return null SkBitmap when the object has no 1x bitmap.
const SkBitmap* bitmap() const { return &GetBitmap(); }
+ // Returns pointer to 2x bitmap contained by this object. If there is no 2x
+ // bitmap, the bitmap whose scale factor is closest to 2x is returned.
+ const SkBitmap* bitmap2x() const { return &GetBitmap2x(); }
+
// Returns a vector with the image reps contained in this object.
// There is no guarantee that this will return all images rep for
// supported scale factors.
@@ -161,6 +165,7 @@ class GFX_EXPORT ImageSkia {
void Init(const gfx::ImageSkiaRep& image_rep);
const SkBitmap& GetBitmap() const;
+ const SkBitmap& GetBitmap2x() const;
// Checks if the current thread can read/modify the ImageSkia.
bool CanRead() const;

Powered by Google App Engine
This is Rietveld 408576698