Index: ui/gfx/image/image_skia.h |
diff --git a/ui/gfx/image/image_skia.h b/ui/gfx/image/image_skia.h |
index 24422d2f09a5559c1f28a53532925a83daa35130..fd9c40f4471fcab598a8caeab764bea70dc254ab 100644 |
--- a/ui/gfx/image/image_skia.h |
+++ b/ui/gfx/image/image_skia.h |
@@ -37,6 +37,7 @@ class UI_EXPORT ImageSkia { |
// Creates an instance that will use the |source| to get the image |
// for scale factors. |size| specifes the size of the image in DIP. |
+ // ImageSkia owns |source|. |
ImageSkia(ImageSkiaSource* source, const gfx::Size& size); |
// Adds ref to passed in bitmap. |
@@ -120,6 +121,15 @@ class UI_EXPORT ImageSkia { |
// when source is used. |
std::vector<gfx::ImageSkiaRep> image_reps() const; |
+ // Delete the ImageSkiaSource if any. It will make GetRepresentation |
+ // thread safe because it will no longer update the storage. |
+ void DeleteSource(); |
+ |
+ // When the source is available, generates all ImageReps for |
+ // supported scale factors. This method is defined as const as |
+ // the state change in the storage is agnostic to the caller. |
+ void EnsureRepsForSupportedScaleFactors() const; |
+ |
private: |
// Initialize ImageSkiaStorage with passed in parameters. |
// If the image rep's bitmap is empty, ImageStorage is set to NULL. |