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

Side by Side Diff: src/ports/SkTypeface_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/SkTypeface_win_dw.h ('k') | src/svg/SkSVGCanvas.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 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 "SkTypes.h" 8 #include "SkTypes.h"
9 // SkTypes will include Windows.h, which will pull in all of the GDI defines. 9 // SkTypes will include Windows.h, which will pull in all of the GDI defines.
10 // GDI #defines GetGlyphIndices to GetGlyphIndicesA or GetGlyphIndicesW, but 10 // GDI #defines GetGlyphIndices to GetGlyphIndicesA or GetGlyphIndicesW, but
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 "Could not get font file reference key."); 232 "Could not get font file reference key.");
233 233
234 SkTScopedComPtr<IDWriteFontFileLoader> fontFileLoader; 234 SkTScopedComPtr<IDWriteFontFileLoader> fontFileLoader;
235 HRNM(fontFile->GetLoader(&fontFileLoader), "Could not get font file loader." ); 235 HRNM(fontFile->GetLoader(&fontFileLoader), "Could not get font file loader." );
236 236
237 SkTScopedComPtr<IDWriteFontFileStream> fontFileStream; 237 SkTScopedComPtr<IDWriteFontFileStream> fontFileStream;
238 HRNM(fontFileLoader->CreateStreamFromKey(fontFileKey, fontFileKeySize, 238 HRNM(fontFileLoader->CreateStreamFromKey(fontFileKey, fontFileKeySize,
239 &fontFileStream), 239 &fontFileStream),
240 "Could not create font file stream."); 240 "Could not create font file stream.");
241 241
242 return SkNEW_ARGS(SkDWriteFontFileStream, (fontFileStream.get())); 242 return new SkDWriteFontFileStream(fontFileStream.get());
243 } 243 }
244 244
245 SkScalerContext* DWriteFontTypeface::onCreateScalerContext(const SkDescriptor* d esc) const { 245 SkScalerContext* DWriteFontTypeface::onCreateScalerContext(const SkDescriptor* d esc) const {
246 return SkNEW_ARGS(SkScalerContext_DW, (const_cast<DWriteFontTypeface*>(this) , desc)); 246 return new SkScalerContext_DW(const_cast<DWriteFontTypeface*>(this), desc);
247 } 247 }
248 248
249 void DWriteFontTypeface::onFilterRec(SkScalerContext::Rec* rec) const { 249 void DWriteFontTypeface::onFilterRec(SkScalerContext::Rec* rec) const {
250 if (rec->fFlags & SkScalerContext::kLCD_Vertical_Flag) { 250 if (rec->fFlags & SkScalerContext::kLCD_Vertical_Flag) {
251 rec->fMaskFormat = SkMask::kA8_Format; 251 rec->fMaskFormat = SkMask::kA8_Format;
252 } 252 }
253 253
254 unsigned flagsWeDontSupport = SkScalerContext::kVertical_Flag | 254 unsigned flagsWeDontSupport = SkScalerContext::kVertical_Flag |
255 SkScalerContext::kDevKernText_Flag | 255 SkScalerContext::kDevKernText_Flag |
256 SkScalerContext::kForceAutohinting_Flag | 256 SkScalerContext::kForceAutohinting_Flag |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 getAdvanceData(fDWriteFontFace.get(), 452 getAdvanceData(fDWriteFontFace.get(),
453 glyphCount, 453 glyphCount,
454 glyphIDs, 454 glyphIDs,
455 glyphIDsCount, 455 glyphIDsCount,
456 getWidthAdvance)); 456 getWidthAdvance));
457 } 457 }
458 } 458 }
459 459
460 return info; 460 return info;
461 } 461 }
OLDNEW
« no previous file with comments | « src/ports/SkTypeface_win_dw.h ('k') | src/svg/SkSVGCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698