| 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();
|
| }
|
|
|