Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(607)

Unified Diff: skia/ext/skia_utils_ios.h

Issue 10928093: Adds an iOS implementation of gfx::Image. (Closed) Base URL: http://git.chromium.org/chromium/src.git@skia
Patch Set: Cleanup. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | skia/ext/skia_utils_ios.mm » ('j') | skia/ext/skia_utils_ios.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/skia_utils_ios.h
diff --git a/skia/ext/skia_utils_ios.h b/skia/ext/skia_utils_ios.h
new file mode 100644
index 0000000000000000000000000000000000000000..6bd820c033e000c5429741a186be148101fa5bed
--- /dev/null
+++ b/skia/ext/skia_utils_ios.h
@@ -0,0 +1,34 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SKIA_EXT_SKIA_UTILS_IOS_H_
+#define SKIA_EXT_SKIA_UTILS_IOS_H_
+
+#include <CoreGraphics/CoreGraphics.h>
+#include <vector>
+
+#include "third_party/skia/include/core/SkBitmap.h"
+
+#ifdef __OBJC__
+@class UIImage;
+#else
+class UIImage;
+#endif
+
+namespace gfx {
+
+// Draws a UIImage with a given size into a SkBitmap.
+SK_API SkBitmap UIImageToSkBitmap(UIImage* image, CGSize size, bool is_opaque);
+
+// Given an SkBitmap and a color space, return an autoreleased UIImage.
+SK_API UIImage* SkBitmapToUIImageWithColorSpace(const SkBitmap& icon,
+ CGColorSpaceRef colorSpace);
Robert Sesek 2012/09/13 16:14:24 naming: color_space
rohitrao (ping after 24h) 2012/09/13 17:57:57 Done.
+
+// Given an SkBitmap, return an autoreleased UIImage in the generic color space.
+// DEPRECATED, use SkBitmapToUIImageWithColorSpace() instead.
Robert Sesek 2012/09/13 16:14:24 Why are you adding deprecated code?
rohitrao (ping after 24h) 2012/09/13 17:57:57 Gotta be just like Mac! (Removed.)
+SK_API UIImage* SkBitmapToUIImage(const SkBitmap& icon);
+
+} // namespace gfx
+
+#endif // SKIA_EXT_SKIA_UTILS_IOS_H_
« no previous file with comments | « no previous file | skia/ext/skia_utils_ios.mm » ('j') | skia/ext/skia_utils_ios.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698