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 9ebeb5f750b2968d10d4155e3f1945e394d4608e..ab94821a3e7052ed76befedd279d4e2434eed39d 100644 |
| --- a/ui/gfx/image/image_skia.h |
| +++ b/ui/gfx/image/image_skia.h |
| @@ -14,13 +14,15 @@ |
| #include "ui/gfx/image/image_skia_rep.h" |
| namespace gfx { |
| +class ImageSkiaSource; |
| +class Size; |
| namespace internal { |
| class ImageSkiaStorage; |
| } // namespace internal |
| // Container for the same image at different densities, similar to NSImage. |
| -// Image height and width are in DIP (Device Indepent Pixel) coordinates. |
| +// Image height and width are in DIP (Density Indepent Pixel) coordinates. |
| // |
| // ImageSkia should be used whenever possible instead of SkBitmap. |
| // Functions that mutate the image should operate on the gfx::ImageSkiaRep |
| @@ -31,9 +33,13 @@ class UI_EXPORT ImageSkia { |
| public: |
| typedef std::vector<ImageSkiaRep> ImageSkiaReps; |
| - // Creates instance with no bitmaps. |
| + // Creates an instance with no bitmaps. |
| 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(ImageSkiaSource* soruce, const gfx::Size& size); |
|
Ben Goodger (Google)
2012/07/02 21:22:50
source
oshima
2012/07/02 21:35:06
Done.
|
| + |
| // Adds ref to passed in bitmap. |
| // DIP width and height are set based on scale factor of 1x. |
| // TODO(pkotwicz): This is temporary till conversion to gfx::ImageSkia is |
| @@ -95,6 +101,7 @@ class UI_EXPORT ImageSkia { |
| // Width and height of image in DIP coordinate system. |
| int width() const; |
| int height() const; |
| + gfx::Size size() const; |
| // Wrapper function for SkBitmap::extractBitmap. |
| // Operates on each stored image rep. |
| @@ -113,15 +120,6 @@ class UI_EXPORT ImageSkia { |
| // If the image rep's bitmap is empty, ImageStorage is set to NULL. |
| void Init(const gfx::ImageSkiaRep& image_rep); |
| - // A null image rep to return as not to return a temporary. |
| - static gfx::ImageSkiaRep& NullImageRep(); |
| - |
| - // Returns the iterator of the image rep whose density best matches |
| - // |scale_factor|. |
| - // ImageSkiaStorage cannot be NULL when this function is called. |
| - ImageSkiaReps::iterator FindRepresentation( |
| - ui::ScaleFactor scale_factor) const; |
| - |
| // A refptr so that ImageRepSkia can be copied cheaply. |
| scoped_refptr<internal::ImageSkiaStorage> storage_; |
| }; |