| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_UTIL_IOS_H_ | 5 #ifndef UI_GFX_IMAGE_IMAGE_SKIA_UTIL_IOS_H_ |
| 6 #define UI_GFX_IMAGE_IMAGE_SKIA_UTIL_IOS_H_ | 6 #define UI_GFX_IMAGE_IMAGE_SKIA_UTIL_IOS_H_ |
| 7 | 7 |
| 8 #include "ui/gfx/gfx_export.h" | 8 #include "ui/gfx/gfx_export.h" |
| 9 | 9 |
| 10 #ifdef __OBJC__ | 10 #ifdef __OBJC__ |
| 11 @class UIImage; | 11 @class UIImage; |
| 12 #else | 12 #else |
| 13 class UIImage; | 13 class UIImage; |
| 14 #endif | 14 #endif |
| 15 | 15 |
| 16 namespace gfx { | 16 namespace gfx { |
| 17 class ImageSkia; | 17 class ImageSkia; |
| 18 class ImageSkiaRep; | 18 class ImageSkiaRep; |
| 19 | 19 |
| 20 // Converts to ImageSkia from UIImage. | 20 // Converts to ImageSkia from UIImage. |
| 21 UI_EXPORT gfx::ImageSkia ImageSkiaFromUIImage(UIImage* image); | 21 GFX_EXPORT gfx::ImageSkia ImageSkiaFromUIImage(UIImage* image); |
| 22 | 22 |
| 23 // Converts to an ImageSkiaRep of |scale_factor| from UIImage. | 23 // Converts to an ImageSkiaRep of |scale_factor| from UIImage. |
| 24 // |scale| is passed explicitly in order to allow this method to be used | 24 // |scale| is passed explicitly in order to allow this method to be used |
| 25 // with a |scale| which is not supported by the platform. | 25 // with a |scale| which is not supported by the platform. |
| 26 UI_EXPORT gfx::ImageSkiaRep ImageSkiaRepOfScaleFromUIImage( | 26 GFX_EXPORT gfx::ImageSkiaRep ImageSkiaRepOfScaleFromUIImage( |
| 27 UIImage* image, | 27 UIImage* image, |
| 28 float scale); | 28 float scale); |
| 29 | 29 |
| 30 // Converts to UIImage from ImageSkia. The returned UIImage will be at the scale | 30 // Converts to UIImage from ImageSkia. The returned UIImage will be at the scale |
| 31 // of the ImageSkiaRep in |image_skia| which most closely matches the device's | 31 // of the ImageSkiaRep in |image_skia| which most closely matches the device's |
| 32 // scale factor (eg Retina iPad -> 2x). Returns an autoreleased UIImage. | 32 // scale factor (eg Retina iPad -> 2x). Returns an autoreleased UIImage. |
| 33 UI_EXPORT UIImage* UIImageFromImageSkia(const gfx::ImageSkia& image_skia); | 33 GFX_EXPORT UIImage* UIImageFromImageSkia(const gfx::ImageSkia& image_skia); |
| 34 | 34 |
| 35 // Converts to UIImage from ImageSkiaRep. Returns an autoreleased UIImage. | 35 // Converts to UIImage from ImageSkiaRep. Returns an autoreleased UIImage. |
| 36 UI_EXPORT UIImage* UIImageFromImageSkiaRep( | 36 GFX_EXPORT UIImage* UIImageFromImageSkiaRep( |
| 37 const gfx::ImageSkiaRep& image_skia_rep); | 37 const gfx::ImageSkiaRep& image_skia_rep); |
| 38 | 38 |
| 39 } // namespace gfx | 39 } // namespace gfx |
| 40 | 40 |
| 41 #endif // UI_GFX_IMAGE_IMAGE_SKIA_UTIL_IOS_H_ | 41 #endif // UI_GFX_IMAGE_IMAGE_SKIA_UTIL_IOS_H_ |
| OLD | NEW |