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

Side by Side Diff: src/ports/SkRemotableFontMgr_win_dw.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 3 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
« no previous file with comments | « src/ports/SkOSFile_win.cpp ('k') | src/ports/SkTypeface_win_dw.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 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 #include "SkDWrite.h" 8 #include "SkDWrite.h"
9 #include "SkDWriteFontFileStream.h" 9 #include "SkDWriteFontFileStream.h"
10 #include "SkDataTable.h" 10 #include "SkDataTable.h"
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 } 459 }
460 const DataId& id = fDataIdCache[dataId]; 460 const DataId& id = fDataIdCache[dataId];
461 461
462 SkTScopedComPtr<IDWriteFontFileLoader> loader; 462 SkTScopedComPtr<IDWriteFontFileLoader> loader;
463 HRNM(id.fLoader->QueryInterface(&loader), "QuerryInterface IDWriteFontFi leLoader failed"); 463 HRNM(id.fLoader->QueryInterface(&loader), "QuerryInterface IDWriteFontFi leLoader failed");
464 464
465 SkTScopedComPtr<IDWriteFontFileStream> fontFileStream; 465 SkTScopedComPtr<IDWriteFontFileStream> fontFileStream;
466 HRNM(loader->CreateStreamFromKey(id.fKey, id.fKeySize, &fontFileStream), 466 HRNM(loader->CreateStreamFromKey(id.fKey, id.fKeySize, &fontFileStream),
467 "Could not create font file stream."); 467 "Could not create font file stream.");
468 468
469 return SkNEW_ARGS(SkDWriteFontFileStream, (fontFileStream.get())); 469 return new SkDWriteFontFileStream(fontFileStream.get());
470 } 470 }
471 471
472 private: 472 private:
473 SkTScopedComPtr<IDWriteFontCollection> fFontCollection; 473 SkTScopedComPtr<IDWriteFontCollection> fFontCollection;
474 SkSMallocWCHAR fLocaleName; 474 SkSMallocWCHAR fLocaleName;
475 475
476 typedef SkRemotableFontMgr INHERITED; 476 typedef SkRemotableFontMgr INHERITED;
477 }; 477 };
478 478
479 SkRemotableFontMgr* SkRemotableFontMgr_New_DirectWrite() { 479 SkRemotableFontMgr* SkRemotableFontMgr_New_DirectWrite() {
(...skipping 15 matching lines...) Expand all
495 HRESULT hr = SkGetGetUserDefaultLocaleNameProc(&getUserDefaultLocaleNameProc ); 495 HRESULT hr = SkGetGetUserDefaultLocaleNameProc(&getUserDefaultLocaleNameProc );
496 if (NULL == getUserDefaultLocaleNameProc) { 496 if (NULL == getUserDefaultLocaleNameProc) {
497 SK_TRACEHR(hr, "Could not get GetUserDefaultLocaleName."); 497 SK_TRACEHR(hr, "Could not get GetUserDefaultLocaleName.");
498 } else { 498 } else {
499 localeNameLen = getUserDefaultLocaleNameProc(localeNameStorage, LOCALE_N AME_MAX_LENGTH); 499 localeNameLen = getUserDefaultLocaleNameProc(localeNameStorage, LOCALE_N AME_MAX_LENGTH);
500 if (localeNameLen) { 500 if (localeNameLen) {
501 localeName = localeNameStorage; 501 localeName = localeNameStorage;
502 }; 502 };
503 } 503 }
504 504
505 return SkNEW_ARGS(SkRemotableFontMgr_DirectWrite, (sysFontCollection.get(), 505 return new SkRemotableFontMgr_DirectWrite(sysFontCollection.get(), localeNam e, localeNameLen);
506 localeName, localeNameLen ));
507 } 506 }
OLDNEW
« no previous file with comments | « src/ports/SkOSFile_win.cpp ('k') | src/ports/SkTypeface_win_dw.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698