OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 SKIA_EXT_SKIA_UTILS_MAC_H_ | 5 #ifndef SKIA_EXT_SKIA_UTILS_MAC_H_ |
6 #define SKIA_EXT_SKIA_UTILS_MAC_H_ | 6 #define SKIA_EXT_SKIA_UTILS_MAC_H_ |
7 | 7 |
8 #include <CoreGraphics/CGColor.h> | 8 #include <CoreGraphics/CGColor.h> |
9 | 9 |
10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
11 | 11 |
12 struct SkMatrix; | 12 struct SkMatrix; |
13 struct SkIRect; | 13 struct SkIRect; |
14 struct SkPoint; | 14 struct SkPoint; |
15 struct SkRect; | 15 struct SkRect; |
16 class SkBitmap; | 16 class SkBitmap; |
| 17 #ifdef __LP64__ |
| 18 typedef CGSize NSSize; |
| 19 #else |
17 typedef struct _NSSize NSSize; | 20 typedef struct _NSSize NSSize; |
| 21 #endif |
18 | 22 |
19 #ifdef __OBJC__ | 23 #ifdef __OBJC__ |
20 @class NSImage; | 24 @class NSImage; |
21 #endif | 25 #endif |
22 | 26 |
23 namespace gfx { | 27 namespace gfx { |
24 | 28 |
25 // Converts a Skia point to a CoreGraphics CGPoint. | 29 // Converts a Skia point to a CoreGraphics CGPoint. |
26 // Both use same in-memory format. | 30 // Both use same in-memory format. |
27 inline const CGPoint& SkPointToCGPoint(const SkPoint& point) { | 31 inline const CGPoint& SkPointToCGPoint(const SkPoint& point) { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // Given an SkBitmap, return an autoreleased NSImage. | 65 // Given an SkBitmap, return an autoreleased NSImage. |
62 NSImage* SkBitmapToNSImage(const SkBitmap& icon); | 66 NSImage* SkBitmapToNSImage(const SkBitmap& icon); |
63 #endif | 67 #endif |
64 | 68 |
65 // Returns |[NSImage imageNamed:@"NSApplicationIcon"]| as SkBitmap. | 69 // Returns |[NSImage imageNamed:@"NSApplicationIcon"]| as SkBitmap. |
66 SkBitmap AppplicationIconAtSize(int size); | 70 SkBitmap AppplicationIconAtSize(int size); |
67 | 71 |
68 } // namespace gfx | 72 } // namespace gfx |
69 | 73 |
70 #endif // SKIA_EXT_SKIA_UTILS_MAC_H_ | 74 #endif // SKIA_EXT_SKIA_UTILS_MAC_H_ |
OLD | NEW |