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

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

Issue 179723005: Remove GDI font rendering code for windows (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 | « Source/platform/fonts/FontCache.cpp ('k') | Source/platform/fonts/skia/FontCacheSkia.cpp » ('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 21 matching lines...) Expand all
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/text/WTFString.h" 40 #include "wtf/text/WTFString.h"
41 41
42 #if OS(WIN) && ENABLE(GDI_FONTS_ON_WINDOWS)
43 #include <windows.h>
44 #endif
45
46 #if OS(MACOSX) 42 #if OS(MACOSX)
47 #include "wtf/RetainPtr.h" 43 #include "wtf/RetainPtr.h"
48 #include <CoreFoundation/CFBase.h> 44 #include <CoreFoundation/CFBase.h>
49 typedef struct CGFont* CGFontRef; 45 typedef struct CGFont* CGFontRef;
50 #endif 46 #endif
51 47
52 #if OS(MACOSX) || OS(POSIX) || (OS(WIN) && !ENABLE(GDI_FONTS_ON_WINDOWS)) 48 #if OS(MACOSX) || OS(POSIX) || OS(WIN)
53 #include "wtf/RefPtr.h" 49 #include "wtf/RefPtr.h"
54 class SkTypeface; 50 class SkTypeface;
55 #endif 51 #endif
56 52
57 namespace WebCore { 53 namespace WebCore {
58 54
59 class FontPlatformData; 55 class FontPlatformData;
60 class SharedBuffer; 56 class SharedBuffer;
61 57
62 class PLATFORM_EXPORT FontCustomPlatformData { 58 class PLATFORM_EXPORT FontCustomPlatformData {
63 WTF_MAKE_NONCOPYABLE(FontCustomPlatformData); 59 WTF_MAKE_NONCOPYABLE(FontCustomPlatformData);
64 public: 60 public:
65 static PassOwnPtr<FontCustomPlatformData> create(SharedBuffer*); 61 static PassOwnPtr<FontCustomPlatformData> create(SharedBuffer*);
66 ~FontCustomPlatformData(); 62 ~FontCustomPlatformData();
67 63
68 FontPlatformData fontPlatformData(float size, bool bold, bool italic, FontOr ientation = Horizontal, FontWidthVariant = RegularWidth); 64 FontPlatformData fontPlatformData(float size, bool bold, bool italic, FontOr ientation = Horizontal, FontWidthVariant = RegularWidth);
69 65
70 static bool supportsFormat(const String&); 66 static bool supportsFormat(const String&);
71 67
72 private: 68 private:
73 #if OS(WIN) && ENABLE(GDI_FONTS_ON_WINDOWS) 69 #if OS(MACOSX)
74 FontCustomPlatformData(HANDLE fontReference, const String& name);
75 HANDLE m_fontReference;
76 String m_name;
77 #elif OS(MACOSX)
78 explicit FontCustomPlatformData(CGFontRef, PassRefPtr<SkTypeface>); 70 explicit FontCustomPlatformData(CGFontRef, PassRefPtr<SkTypeface>);
79 RetainPtr<CGFontRef> m_cgFont; 71 RetainPtr<CGFontRef> m_cgFont;
80 RefPtr<SkTypeface> m_typeface; 72 RefPtr<SkTypeface> m_typeface;
81 #elif OS(POSIX) || (OS(WIN) && !ENABLE(GDI_FONTS_ON_WINDOWS)) 73 #elif OS(POSIX) || OS(WIN)
82 explicit FontCustomPlatformData(PassRefPtr<SkTypeface>); 74 explicit FontCustomPlatformData(PassRefPtr<SkTypeface>);
83 RefPtr<SkTypeface> m_typeface; 75 RefPtr<SkTypeface> m_typeface;
84 #endif 76 #endif
85 }; 77 };
86 78
87 } // namespace WebCore 79 } // namespace WebCore
88 80
89 #endif // FontCustomPlatformData_h 81 #endif // FontCustomPlatformData_h
OLDNEW
« no previous file with comments | « Source/platform/fonts/FontCache.cpp ('k') | Source/platform/fonts/skia/FontCacheSkia.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698