| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_GFX_IMAGE_IMAGE_SKIA_H_ | 5 #ifndef UI_GFX_IMAGE_IMAGE_SKIA_H_ |
| 6 #define UI_GFX_IMAGE_IMAGE_SKIA_H_ | 6 #define UI_GFX_IMAGE_IMAGE_SKIA_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // Copies a reference to |other|'s storage. | 53 // Copies a reference to |other|'s storage. |
| 54 ImageSkia& operator=(const ImageSkia& other); | 54 ImageSkia& operator=(const ImageSkia& other); |
| 55 | 55 |
| 56 // Converts from SkBitmap. | 56 // Converts from SkBitmap. |
| 57 // Adds ref to passed in bitmap. | 57 // Adds ref to passed in bitmap. |
| 58 // DIP width and height are set based on scale factor of 1x. | 58 // DIP width and height are set based on scale factor of 1x. |
| 59 // TODO(pkotwicz): This is temporary till conversion to gfx::ImageSkia is | 59 // TODO(pkotwicz): This is temporary till conversion to gfx::ImageSkia is |
| 60 // done. | 60 // done. |
| 61 ImageSkia& operator=(const SkBitmap& other); | 61 ImageSkia& operator=(const SkBitmap& other); |
| 62 | 62 |
| 63 #if defined(OS_MACOSX) || defined(OS_WIN) | 63 #if defined(OS_WIN) |
| 64 // Converts to gfx::ImageSkiaRep and SkBitmap. | 64 // Converts to gfx::ImageSkiaRep and SkBitmap. |
| 65 // TODO(pkotwicz): This is temporary till conversion to gfx::ImageSkia is | 65 // TODO(pkotwicz): This is temporary till conversion to gfx::ImageSkia is |
| 66 // done. | 66 // done. |
| 67 operator SkBitmap&() const { return GetBitmap(); } | 67 operator SkBitmap&() const { return GetBitmap(); } |
| 68 #endif | 68 #endif |
| 69 | 69 |
| 70 ~ImageSkia(); | 70 ~ImageSkia(); |
| 71 | 71 |
| 72 // Returns true if this object is backed by the same ImageSkiaStorage as | 72 // Returns true if this object is backed by the same ImageSkiaStorage as |
| 73 // |other|. Will also return true if both images are isNull(). | 73 // |other|. Will also return true if both images are isNull(). |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 SkBitmap& GetBitmap() const; | 136 SkBitmap& GetBitmap() const; |
| 137 | 137 |
| 138 // A refptr so that ImageRepSkia can be copied cheaply. | 138 // A refptr so that ImageRepSkia can be copied cheaply. |
| 139 scoped_refptr<internal::ImageSkiaStorage> storage_; | 139 scoped_refptr<internal::ImageSkiaStorage> storage_; |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 } // namespace gfx | 142 } // namespace gfx |
| 143 | 143 |
| 144 #endif // UI_GFX_IMAGE_IMAGE_SKIA_H_ | 144 #endif // UI_GFX_IMAGE_IMAGE_SKIA_H_ |
| OLD | NEW |