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

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

Issue 1880873002: Revert "Revert of Pass effects directly to fontcache (patchset #8 id:140001 of https://codereview.c… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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') | tests/FontMgrTest.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 #if defined(SK_BUILD_FOR_WIN32) 9 #if defined(SK_BUILD_FOR_WIN32)
10 10
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 HRNM(fontFile->GetLoader(&fontFileLoader), "Could not get font file loader." ); 237 HRNM(fontFile->GetLoader(&fontFileLoader), "Could not get font file loader." );
238 238
239 SkTScopedComPtr<IDWriteFontFileStream> fontFileStream; 239 SkTScopedComPtr<IDWriteFontFileStream> fontFileStream;
240 HRNM(fontFileLoader->CreateStreamFromKey(fontFileKey, fontFileKeySize, 240 HRNM(fontFileLoader->CreateStreamFromKey(fontFileKey, fontFileKeySize,
241 &fontFileStream), 241 &fontFileStream),
242 "Could not create font file stream."); 242 "Could not create font file stream.");
243 243
244 return new SkDWriteFontFileStream(fontFileStream.get()); 244 return new SkDWriteFontFileStream(fontFileStream.get());
245 } 245 }
246 246
247 SkScalerContext* DWriteFontTypeface::onCreateScalerContext(const SkDescriptor* d esc) const { 247 SkScalerContext* DWriteFontTypeface::onCreateScalerContext(const SkScalerContext Effects& effects,
248 return new SkScalerContext_DW(const_cast<DWriteFontTypeface*>(this), desc); 248 const SkDescriptor* d esc) const {
249 return new SkScalerContext_DW(const_cast<DWriteFontTypeface*>(this), effects , desc);
249 } 250 }
250 251
251 void DWriteFontTypeface::onFilterRec(SkScalerContext::Rec* rec) const { 252 void DWriteFontTypeface::onFilterRec(SkScalerContext::Rec* rec) const {
252 if (rec->fFlags & SkScalerContext::kLCD_Vertical_Flag) { 253 if (rec->fFlags & SkScalerContext::kLCD_Vertical_Flag) {
253 rec->fMaskFormat = SkMask::kA8_Format; 254 rec->fMaskFormat = SkMask::kA8_Format;
254 } 255 }
255 256
256 unsigned flagsWeDontSupport = SkScalerContext::kVertical_Flag | 257 unsigned flagsWeDontSupport = SkScalerContext::kVertical_Flag |
257 SkScalerContext::kDevKernText_Flag | 258 SkScalerContext::kDevKernText_Flag |
258 SkScalerContext::kForceAutohinting_Flag | 259 SkScalerContext::kForceAutohinting_Flag |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 glyphCount, 456 glyphCount,
456 glyphIDs, 457 glyphIDs,
457 glyphIDsCount, 458 glyphIDsCount,
458 getWidthAdvance)); 459 getWidthAdvance));
459 } 460 }
460 } 461 }
461 462
462 return info; 463 return info;
463 } 464 }
464 #endif//defined(SK_BUILD_FOR_WIN32) 465 #endif//defined(SK_BUILD_FOR_WIN32)
OLDNEW
« no previous file with comments | « src/ports/SkTypeface_win_dw.h ('k') | tests/FontMgrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698