| 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 #include "ui/gfx/image/image_skia_util_ios.h" | 5 #include "ui/gfx/image/image_skia_util_ios.h" |
| 6 | 6 |
| 7 #include <UIKit/UIKit.h> | 7 #import <UIKit/UIKit.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/mac/scoped_cftyperef.h" | 10 #include "base/mac/scoped_cftyperef.h" |
| 11 #include "skia/ext/skia_utils_ios.h" | 11 #include "skia/ext/skia_utils_ios.h" |
| 12 #include "third_party/skia/include/core/SkBitmap.h" | 12 #include "third_party/skia/include/core/SkBitmap.h" |
| 13 #include "ui/gfx/image/image_skia.h" | 13 #include "ui/gfx/image/image_skia.h" |
| 14 | 14 |
| 15 namespace gfx { | 15 namespace gfx { |
| 16 | 16 |
| 17 gfx::ImageSkia ImageSkiaFromUIImage(UIImage* image) { | 17 gfx::ImageSkia ImageSkiaFromUIImage(UIImage* image) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 47 return nil; | 47 return nil; |
| 48 | 48 |
| 49 float scale = image_skia_rep.scale(); | 49 float scale = image_skia_rep.scale(); |
| 50 base::ScopedCFTypeRef<CGColorSpaceRef> color_space( | 50 base::ScopedCFTypeRef<CGColorSpaceRef> color_space( |
| 51 CGColorSpaceCreateDeviceRGB()); | 51 CGColorSpaceCreateDeviceRGB()); |
| 52 return skia::SkBitmapToUIImageWithColorSpace(image_skia_rep.sk_bitmap(), | 52 return skia::SkBitmapToUIImageWithColorSpace(image_skia_rep.sk_bitmap(), |
| 53 scale, color_space); | 53 scale, color_space); |
| 54 } | 54 } |
| 55 | 55 |
| 56 } // namespace gfx | 56 } // namespace gfx |
| OLD | NEW |