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

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

Issue 10828296: Avoid crashing when an ImageSkia has no representations and is converted to SkBitmap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test Created 8 years, 4 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_rep.h
diff --git a/ui/gfx/image/image_skia_rep.h b/ui/gfx/image/image_skia_rep.h
index 0376895ec4ed9c872fa3ed1fa73e13426802eb77..809ab98132419334c66892fd6094268505959359 100644
--- a/ui/gfx/image/image_skia_rep.h
+++ b/ui/gfx/image/image_skia_rep.h
@@ -46,6 +46,9 @@ class UI_EXPORT ImageSkiaRep {
const SkBitmap& sk_bitmap() const { return bitmap_; }
private:
+ friend class ImageSkia;
+ SkBitmap& mutable_sk_bitmap() { return bitmap_; }
+
SkBitmap bitmap_;
ui::ScaleFactor scale_factor_;
};

Powered by Google App Engine
This is Rietveld 408576698