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

Side by Side Diff: Source/platform/fonts/FontCustomPlatformData.h

Issue 209083003: Remove unnecessary ifdefs from font code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/platform/fonts/SimpleFontData.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 19 matching lines...) Expand all
30 */ 30 */
31 31
32 #ifndef FontCustomPlatformData_h 32 #ifndef FontCustomPlatformData_h
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/text/WTFString.h" 41 #include "wtf/text/WTFString.h"
41 42
42 #if OS(MACOSX) 43 #if OS(MACOSX)
43 #include "wtf/RetainPtr.h" 44 #include "wtf/RetainPtr.h"
44 #include <CoreFoundation/CFBase.h> 45 #include <CoreFoundation/CFBase.h>
45 typedef struct CGFont* CGFontRef; 46 typedef struct CGFont* CGFontRef;
46 #endif 47 #endif
47 48
48 #if OS(MACOSX) || OS(POSIX) || OS(WIN)
49 #include "wtf/RefPtr.h"
50 class SkTypeface; 49 class SkTypeface;
51 #endif
52 50
53 namespace WebCore { 51 namespace WebCore {
54 52
55 class FontPlatformData; 53 class FontPlatformData;
56 class SharedBuffer; 54 class SharedBuffer;
57 55
58 class PLATFORM_EXPORT FontCustomPlatformData { 56 class PLATFORM_EXPORT FontCustomPlatformData {
59 WTF_MAKE_NONCOPYABLE(FontCustomPlatformData); 57 WTF_MAKE_NONCOPYABLE(FontCustomPlatformData);
60 public: 58 public:
61 static PassOwnPtr<FontCustomPlatformData> create(SharedBuffer*); 59 static PassOwnPtr<FontCustomPlatformData> create(SharedBuffer*);
62 ~FontCustomPlatformData(); 60 ~FontCustomPlatformData();
63 61
64 FontPlatformData fontPlatformData(float size, bool bold, bool italic, FontOr ientation = Horizontal, FontWidthVariant = RegularWidth); 62 FontPlatformData fontPlatformData(float size, bool bold, bool italic, FontOr ientation = Horizontal, FontWidthVariant = RegularWidth);
65 63
66 static bool supportsFormat(const String&); 64 static bool supportsFormat(const String&);
67 65
68 private: 66 private:
69 #if OS(MACOSX) 67 #if OS(MACOSX)
70 explicit FontCustomPlatformData(CGFontRef, PassRefPtr<SkTypeface>); 68 explicit FontCustomPlatformData(CGFontRef, PassRefPtr<SkTypeface>);
71 RetainPtr<CGFontRef> m_cgFont; 69 RetainPtr<CGFontRef> m_cgFont;
70 #else
71 explicit FontCustomPlatformData(PassRefPtr<SkTypeface>);
72 #endif
72 RefPtr<SkTypeface> m_typeface; 73 RefPtr<SkTypeface> m_typeface;
73 #elif OS(POSIX) || OS(WIN)
74 explicit FontCustomPlatformData(PassRefPtr<SkTypeface>);
75 RefPtr<SkTypeface> m_typeface;
76 #endif
77 }; 74 };
78 75
79 } // namespace WebCore 76 } // namespace WebCore
80 77
81 #endif // FontCustomPlatformData_h 78 #endif // FontCustomPlatformData_h
OLDNEW
« no previous file with comments | « no previous file | Source/platform/fonts/SimpleFontData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698