Chromium Code Reviews| 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..5fac9e07ff501aee96413ce7c56291ec4302a3da 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 soruce is available, generates all ImageReps for |
|
sky
2012/08/23 16:32:32
soruce -> source
oshima
2012/08/23 16:57:31
Done.
|
| + // 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. |