| 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 // An Image wraps an image any flavor, be it platform-native GdkBitmap/NSImage, | 5 // An Image wraps an image any flavor, be it platform-native GdkBitmap/NSImage, |
| 6 // or a SkBitmap. This also provides easy conversion to other image types | 6 // or a SkBitmap. This also provides easy conversion to other image types |
| 7 // through operator overloading. It will cache the converted representations | 7 // through operator overloading. It will cache the converted representations |
| 8 // internally to prevent double-conversion. | 8 // internally to prevent double-conversion. |
| 9 // | 9 // |
| 10 // The lifetime of both the initial representation and any converted ones are | 10 // The lifetime of both the initial representation and any converted ones are |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 RepresentationType rep_type, bool must_exist) const; | 184 RepresentationType rep_type, bool must_exist) const; |
| 185 | 185 |
| 186 // Stores a representation into the map. A representation of that type must | 186 // Stores a representation into the map. A representation of that type must |
| 187 // not already be in the map. Returns a pointer to the representation stored | 187 // not already be in the map. Returns a pointer to the representation stored |
| 188 // inside the map. | 188 // inside the map. |
| 189 internal::ImageRep* AddRepresentation( | 189 internal::ImageRep* AddRepresentation( |
| 190 std::unique_ptr<internal::ImageRep> rep) const; | 190 std::unique_ptr<internal::ImageRep> rep) const; |
| 191 | 191 |
| 192 // Internal class that holds all the representations. This allows the Image to | 192 // Internal class that holds all the representations. This allows the Image to |
| 193 // be cheaply copied. | 193 // be cheaply copied. |
| 194 scoped_refptr<internal::ImageStorage> storage_; | 194 std::unique_ptr<internal::ImageStorage> storage_; |
| 195 }; | 195 }; |
| 196 | 196 |
| 197 } // namespace gfx | 197 } // namespace gfx |
| 198 | 198 |
| 199 #endif // UI_GFX_IMAGE_IMAGE_H_ | 199 #endif // UI_GFX_IMAGE_IMAGE_H_ |
| OLD | NEW |