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

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

Issue 715363005: Remove FontPlatformData::m_widthVariant. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments. 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/fetch/FontResource.cpp ('k') | Source/platform/fonts/FontPlatformData.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 16 matching lines...) Expand all
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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"
38 #include "wtf/Forward.h" 37 #include "wtf/Forward.h"
39 #include "wtf/Noncopyable.h" 38 #include "wtf/Noncopyable.h"
40 #include "wtf/RefPtr.h" 39 #include "wtf/RefPtr.h"
41 #include "wtf/text/WTFString.h" 40 #include "wtf/text/WTFString.h"
42 41
43 #if OS(MACOSX) 42 #if OS(MACOSX)
44 #include "wtf/RetainPtr.h" 43 #include "wtf/RetainPtr.h"
45 #include <CoreFoundation/CFBase.h> 44 #include <CoreFoundation/CFBase.h>
46 typedef struct CGFont* CGFontRef; 45 typedef struct CGFont* CGFontRef;
47 #endif 46 #endif
48 47
49 class SkTypeface; 48 class SkTypeface;
50 49
51 namespace blink { 50 namespace blink {
52 51
53 class FontPlatformData; 52 class FontPlatformData;
54 class SharedBuffer; 53 class SharedBuffer;
55 54
56 class PLATFORM_EXPORT FontCustomPlatformData { 55 class PLATFORM_EXPORT FontCustomPlatformData {
57 WTF_MAKE_NONCOPYABLE(FontCustomPlatformData); 56 WTF_MAKE_NONCOPYABLE(FontCustomPlatformData);
58 public: 57 public:
59 static PassOwnPtr<FontCustomPlatformData> create(SharedBuffer*); 58 static PassOwnPtr<FontCustomPlatformData> create(SharedBuffer*);
60 ~FontCustomPlatformData(); 59 ~FontCustomPlatformData();
61 60
62 FontPlatformData fontPlatformData(float size, bool bold, bool italic, FontOr ientation = Horizontal, FontWidthVariant = RegularWidth); 61 FontPlatformData fontPlatformData(float size, bool bold, bool italic, FontOr ientation = Horizontal);
63 62
64 static bool supportsFormat(const String&); 63 static bool supportsFormat(const String&);
65 64
66 private: 65 private:
67 #if OS(MACOSX) 66 #if OS(MACOSX)
68 explicit FontCustomPlatformData(CGFontRef, PassRefPtr<SkTypeface>); 67 explicit FontCustomPlatformData(CGFontRef, PassRefPtr<SkTypeface>);
69 RetainPtr<CGFontRef> m_cgFont; 68 RetainPtr<CGFontRef> m_cgFont;
70 #else 69 #else
71 explicit FontCustomPlatformData(PassRefPtr<SkTypeface>); 70 explicit FontCustomPlatformData(PassRefPtr<SkTypeface>);
72 #endif 71 #endif
73 RefPtr<SkTypeface> m_typeface; 72 RefPtr<SkTypeface> m_typeface;
74 }; 73 };
75 74
76 } // namespace blink 75 } // namespace blink
77 76
78 #endif // FontCustomPlatformData_h 77 #endif // FontCustomPlatformData_h
OLDNEW
« no previous file with comments | « Source/core/fetch/FontResource.cpp ('k') | Source/platform/fonts/FontPlatformData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698