| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/child/font_warmup_win.h" | 5 #include "content/child/font_warmup_win.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 | 10 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 uint32_t glyphIDsCount) const override { | 49 uint32_t glyphIDsCount) const override { |
| 50 ADD_FAILURE(); | 50 ADD_FAILURE(); |
| 51 return nullptr; | 51 return nullptr; |
| 52 } | 52 } |
| 53 | 53 |
| 54 SkStreamAsset* onOpenStream(int* ttcIndex) const override { | 54 SkStreamAsset* onOpenStream(int* ttcIndex) const override { |
| 55 ADD_FAILURE(); | 55 ADD_FAILURE(); |
| 56 return nullptr; | 56 return nullptr; |
| 57 } | 57 } |
| 58 | 58 |
| 59 SkFontData* onCreateFontData() const override { | |
| 60 ADD_FAILURE(); | |
| 61 return nullptr; | |
| 62 } | |
| 63 | |
| 64 void onGetFontDescriptor(SkFontDescriptor*, bool* isLocal) const override { | 59 void onGetFontDescriptor(SkFontDescriptor*, bool* isLocal) const override { |
| 65 ADD_FAILURE(); | 60 ADD_FAILURE(); |
| 66 } | 61 } |
| 67 | 62 |
| 68 int onCharsToGlyphs(const void* chars, | 63 int onCharsToGlyphs(const void* chars, |
| 69 Encoding, | 64 Encoding, |
| 70 uint16_t glyphs[], | 65 uint16_t glyphs[], |
| 71 int glyphCount) const override { | 66 int glyphCount) const override { |
| 72 ADD_FAILURE(); | 67 ADD_FAILURE(); |
| 73 return 0; | 68 return 0; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 SkTypeface* onCreateFromData(SkData*, int ttcIndex) const override { | 178 SkTypeface* onCreateFromData(SkData*, int ttcIndex) const override { |
| 184 ADD_FAILURE(); | 179 ADD_FAILURE(); |
| 185 return nullptr; | 180 return nullptr; |
| 186 } | 181 } |
| 187 | 182 |
| 188 SkTypeface* onCreateFromStream(SkStreamAsset*, int ttcIndex) const override { | 183 SkTypeface* onCreateFromStream(SkStreamAsset*, int ttcIndex) const override { |
| 189 ADD_FAILURE(); | 184 ADD_FAILURE(); |
| 190 return nullptr; | 185 return nullptr; |
| 191 } | 186 } |
| 192 | 187 |
| 193 SkTypeface* onCreateFromFontData(SkFontData*) const override { | |
| 194 ADD_FAILURE(); | |
| 195 return nullptr; | |
| 196 } | |
| 197 | |
| 198 SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override { | 188 SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override { |
| 199 ADD_FAILURE(); | 189 ADD_FAILURE(); |
| 200 return nullptr; | 190 return nullptr; |
| 201 } | 191 } |
| 202 | 192 |
| 203 SkTypeface* onLegacyCreateTypeface(const char familyName[], | 193 SkTypeface* onLegacyCreateTypeface(const char familyName[], |
| 204 SkFontStyle style) const override { | 194 SkFontStyle style) const override { |
| 205 ADD_FAILURE(); | 195 ADD_FAILURE(); |
| 206 return nullptr; | 196 return nullptr; |
| 207 } | 197 } |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 DWORD data_size = static_cast<DWORD>(strlen(kTestFontData)); | 417 DWORD data_size = static_cast<DWORD>(strlen(kTestFontData)); |
| 428 std::vector<char> data(data_size); | 418 std::vector<char> data(data_size); |
| 429 DWORD size = GetFontData(hdc, kTestFontTableTag, 0, &data[0], data.size()); | 419 DWORD size = GetFontData(hdc, kTestFontTableTag, 0, &data[0], data.size()); |
| 430 EXPECT_EQ(size, data_size); | 420 EXPECT_EQ(size, data_size); |
| 431 EXPECT_EQ(memcmp(&data[0], kTestFontData, data.size()), 0); | 421 EXPECT_EQ(memcmp(&data[0], kTestFontData, data.size()), 0); |
| 432 EXPECT_TRUE(DeleteObject(font)); | 422 EXPECT_TRUE(DeleteObject(font)); |
| 433 EXPECT_TRUE(DeleteDC(hdc)); | 423 EXPECT_TRUE(DeleteDC(hdc)); |
| 434 } | 424 } |
| 435 | 425 |
| 436 } // namespace content | 426 } // namespace content |
| OLD | NEW |