OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkTypeface_win_dw_DEFINED | 8 #ifndef SkTypeface_win_dw_DEFINED |
9 #define SkTypeface_win_dw_DEFINED | 9 #define SkTypeface_win_dw_DEFINED |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 , fDWriteFontCollectionLoader(SkSafeRefComPtr(fontCollectionLoader)) | 48 , fDWriteFontCollectionLoader(SkSafeRefComPtr(fontCollectionLoader)) |
49 , fDWriteFontFileLoader(SkSafeRefComPtr(fontFileLoader)) | 49 , fDWriteFontFileLoader(SkSafeRefComPtr(fontFileLoader)) |
50 , fDWriteFontFamily(SkRefComPtr(fontFamily)) | 50 , fDWriteFontFamily(SkRefComPtr(fontFamily)) |
51 , fDWriteFont(SkRefComPtr(font)) | 51 , fDWriteFont(SkRefComPtr(font)) |
52 , fDWriteFontFace(SkRefComPtr(fontFace)) | 52 , fDWriteFontFace(SkRefComPtr(fontFace)) |
53 { | 53 { |
54 #if SK_HAS_DWRITE_1_H | 54 #if SK_HAS_DWRITE_1_H |
55 if (!SUCCEEDED(fDWriteFontFace->QueryInterface(&fDWriteFontFace1))) { | 55 if (!SUCCEEDED(fDWriteFontFace->QueryInterface(&fDWriteFontFace1))) { |
56 // IUnknown::QueryInterface states that if it fails, punk will be se
t to nullptr. | 56 // IUnknown::QueryInterface states that if it fails, punk will be se
t to nullptr. |
57 // http://blogs.msdn.com/b/oldnewthing/archive/2004/03/26/96777.aspx | 57 // http://blogs.msdn.com/b/oldnewthing/archive/2004/03/26/96777.aspx |
58 SkASSERT_RELEASE(nullptr == fDWriteFontFace1.get()); | 58 SK_ALWAYSBREAK(nullptr == fDWriteFontFace1.get()); |
59 } | 59 } |
60 #endif | 60 #endif |
61 } | 61 } |
62 | 62 |
63 public: | 63 public: |
64 SkTScopedComPtr<IDWriteFactory> fFactory; | 64 SkTScopedComPtr<IDWriteFactory> fFactory; |
65 SkTScopedComPtr<IDWriteFontCollectionLoader> fDWriteFontCollectionLoader; | 65 SkTScopedComPtr<IDWriteFontCollectionLoader> fDWriteFontCollectionLoader; |
66 SkTScopedComPtr<IDWriteFontFileLoader> fDWriteFontFileLoader; | 66 SkTScopedComPtr<IDWriteFontFileLoader> fDWriteFontFileLoader; |
67 SkTScopedComPtr<IDWriteFontFamily> fDWriteFontFamily; | 67 SkTScopedComPtr<IDWriteFontFamily> fDWriteFontFamily; |
68 SkTScopedComPtr<IDWriteFont> fDWriteFont; | 68 SkTScopedComPtr<IDWriteFont> fDWriteFont; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const override; | 109 SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const override; |
110 int onGetTableTags(SkFontTableTag tags[]) const override; | 110 int onGetTableTags(SkFontTableTag tags[]) const override; |
111 virtual size_t onGetTableData(SkFontTableTag, size_t offset, | 111 virtual size_t onGetTableData(SkFontTableTag, size_t offset, |
112 size_t length, void* data) const override; | 112 size_t length, void* data) const override; |
113 | 113 |
114 private: | 114 private: |
115 typedef SkTypeface INHERITED; | 115 typedef SkTypeface INHERITED; |
116 }; | 116 }; |
117 | 117 |
118 #endif | 118 #endif |
OLD | NEW |