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

Side by Side Diff: sky/engine/platform/fonts/FontCustomPlatformData.h

Issue 709603006: Remove a bunch of OS(MACOSX) code (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Even more Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Computer, Inc. 2 * Copyright (C) 2007 Apple Computer, Inc.
3 * Copyright (c) 2007, 2008, 2009, Google Inc. All rights reserved. 3 * Copyright (c) 2007, 2008, 2009, Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 22 matching lines...) Expand all
33 #define FontCustomPlatformData_h 33 #define FontCustomPlatformData_h
34 34
35 #include "platform/PlatformExport.h" 35 #include "platform/PlatformExport.h"
36 #include "platform/fonts/FontOrientation.h" 36 #include "platform/fonts/FontOrientation.h"
37 #include "platform/fonts/FontWidthVariant.h" 37 #include "platform/fonts/FontWidthVariant.h"
38 #include "wtf/Forward.h" 38 #include "wtf/Forward.h"
39 #include "wtf/Noncopyable.h" 39 #include "wtf/Noncopyable.h"
40 #include "wtf/RefPtr.h" 40 #include "wtf/RefPtr.h"
41 #include "wtf/text/WTFString.h" 41 #include "wtf/text/WTFString.h"
42 42
43 #if OS(MACOSX)
44 #include "wtf/RetainPtr.h"
45 #include <CoreFoundation/CFBase.h>
46 typedef struct CGFont* CGFontRef;
47 #endif
48
49 class SkTypeface; 43 class SkTypeface;
50 44
51 namespace blink { 45 namespace blink {
52 46
53 class FontPlatformData; 47 class FontPlatformData;
54 class SharedBuffer; 48 class SharedBuffer;
55 49
56 class PLATFORM_EXPORT FontCustomPlatformData { 50 class PLATFORM_EXPORT FontCustomPlatformData {
57 WTF_MAKE_NONCOPYABLE(FontCustomPlatformData); 51 WTF_MAKE_NONCOPYABLE(FontCustomPlatformData);
58 public: 52 public:
59 static PassOwnPtr<FontCustomPlatformData> create(SharedBuffer*); 53 static PassOwnPtr<FontCustomPlatformData> create(SharedBuffer*);
60 ~FontCustomPlatformData(); 54 ~FontCustomPlatformData();
61 55
62 FontPlatformData fontPlatformData(float size, bool bold, bool italic, FontOr ientation = Horizontal, FontWidthVariant = RegularWidth); 56 FontPlatformData fontPlatformData(float size, bool bold, bool italic, FontOr ientation = Horizontal, FontWidthVariant = RegularWidth);
63 57
64 static bool supportsFormat(const String&); 58 static bool supportsFormat(const String&);
65 59
66 private: 60 private:
67 #if OS(MACOSX)
68 explicit FontCustomPlatformData(CGFontRef, PassRefPtr<SkTypeface>);
69 RetainPtr<CGFontRef> m_cgFont;
70 #else
71 explicit FontCustomPlatformData(PassRefPtr<SkTypeface>); 61 explicit FontCustomPlatformData(PassRefPtr<SkTypeface>);
72 #endif
73 RefPtr<SkTypeface> m_typeface; 62 RefPtr<SkTypeface> m_typeface;
74 }; 63 };
75 64
76 } // namespace blink 65 } // namespace blink
77 66
78 #endif // FontCustomPlatformData_h 67 #endif // FontCustomPlatformData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698