| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_H_ | 5 #ifndef UI_GFX_IMAGE_H_ |
| 6 #define UI_GFX_IMAGE_H_ | 6 #define UI_GFX_IMAGE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "ui/gfx/native_widget_types.h" // Forward-declares GdkPixbuf and NSIma
ge. | 14 #include "ui/gfx/native_widget_types.h" // Forward-declares GdkPixbuf and NSIma
ge. |
| 15 #include "third_party/skia/include/core/SkBitmap.h" | 15 #include "third_party/skia/include/core/SkBitmap.h" |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 class ImageTest; | 18 class ImageTest; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace ui { | |
| 22 namespace gfx { | 21 namespace gfx { |
| 23 | 22 |
| 24 namespace internal { | 23 namespace internal { |
| 25 class ImageRep; | 24 class ImageRep; |
| 26 } | 25 } |
| 27 | 26 |
| 28 // An Image wraps an image any flavor, be it platform-native GdkBitmap/NSImage, | 27 // An Image wraps an image any flavor, be it platform-native GdkBitmap/NSImage, |
| 29 // or a SkBitmap. This also provides easy conversion to other image types | 28 // or a SkBitmap. This also provides easy conversion to other image types |
| 30 // through operator overloading. It will cache the converted representations | 29 // through operator overloading. It will cache the converted representations |
| 31 // internally to prevent double-conversion. | 30 // internally to prevent double-conversion. |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 | 81 |
| 83 typedef std::map<RepresentationType, internal::ImageRep*> RepresentationMap; | 82 typedef std::map<RepresentationType, internal::ImageRep*> RepresentationMap; |
| 84 // All the representations of an Image. Size will always be at least one, with | 83 // All the representations of an Image. Size will always be at least one, with |
| 85 // more for any converted representations. | 84 // more for any converted representations. |
| 86 RepresentationMap representations_; | 85 RepresentationMap representations_; |
| 87 | 86 |
| 88 DISALLOW_COPY_AND_ASSIGN(Image); | 87 DISALLOW_COPY_AND_ASSIGN(Image); |
| 89 }; | 88 }; |
| 90 | 89 |
| 91 } // namespace gfx | 90 } // namespace gfx |
| 92 } // namespace ui | |
| 93 | 91 |
| 94 #endif // UI_GFX_IMAGE_H_ | 92 #endif // UI_GFX_IMAGE_H_ |
| OLD | NEW |