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

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

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
« ui/gfx/image/image_skia.h ('K') | « ui/gfx/image/image_skia.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image_skia.cc
diff --git a/ui/gfx/image/image_skia.cc b/ui/gfx/image/image_skia.cc
index fc5cef4761e8ecbec92f66d8aa617c4d3b547c78..1a42ab69ba816a176a37dc48bca30dd0bc04ed51 100644
--- a/ui/gfx/image/image_skia.cc
+++ b/ui/gfx/image/image_skia.cc
@@ -511,6 +511,22 @@ const SkBitmap& ImageSkia::GetBitmap() const {
return NullImageRep().sk_bitmap();
}
+// TODOs in ImageSkia() also apply to GetBitmap2x().
+const SkBitmap& ImageSkia::GetBitmap2x() const {
+ if (isNull()) {
+ return NullImageRep().sk_bitmap();
+ }
+
+#if !defined(OS_WIN)
+ CHECK(CanRead());
+#endif
+
+ ImageSkiaReps::iterator it = storage_->FindRepresentation(2.0f, true);
+ if (it != storage_->image_reps().end())
+ return it->sk_bitmap();
+ return NullImageRep().sk_bitmap();
+}
+
bool ImageSkia::CanRead() const {
return !storage_.get() || storage_->CanRead();
}
« ui/gfx/image/image_skia.h ('K') | « ui/gfx/image/image_skia.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698