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

Unified Diff: ui/gfx/image/image.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
Index: ui/gfx/image/image.cc
diff --git a/ui/gfx/image/image.cc b/ui/gfx/image/image.cc
index 12254c17def66a5b46fb45db8257732cf14af173..617f71b3ffdd330d8043d4d71ecc604547fbca48 100644
--- a/ui/gfx/image/image.cc
+++ b/ui/gfx/image/image.cc
@@ -482,6 +482,11 @@ const SkBitmap* Image::ToSkBitmap() const {
return ToImageSkia()->bitmap();
}
+const SkBitmap* Image::ToSkBitmap2x() const {
+ // Possibly create and cache an intermediate ImageRepSkia.
+ return ToImageSkia()->bitmap2x();
+}
+
const ImageSkia* Image::ToImageSkia() const {
internal::ImageRep* rep = GetRepresentation(kImageRepSkia, false);
if (!rep) {
@@ -653,6 +658,10 @@ SkBitmap Image::AsBitmap() const {
return IsEmpty() ? SkBitmap() : *ToSkBitmap();
}
+SkBitmap Image::AsBitmap2x() const {
+ return IsEmpty() ? SkBitmap() : *ToSkBitmap2x();
+}
+
ImageSkia Image::AsImageSkia() const {
return IsEmpty() ? ImageSkia() : *ToImageSkia();
}

Powered by Google App Engine
This is Rietveld 408576698