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

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

Issue 1872253004: Revert of Pass effects directly to fontcache (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 SkScalerContext Effects& effects, 247 SkScalerContext* DWriteFontTypeface::onCreateScalerContext(const SkDescriptor* d esc) const {
248 const SkDescriptor* d esc) const { 248 return new SkScalerContext_DW(const_cast<DWriteFontTypeface*>(this), desc);
249 return new SkScalerContext_DW(const_cast<DWriteFontTypeface*>(this), effects , desc);
250 } 249 }
251 250
252 void DWriteFontTypeface::onFilterRec(SkScalerContext::Rec* rec) const { 251 void DWriteFontTypeface::onFilterRec(SkScalerContext::Rec* rec) const {
253 if (rec->fFlags & SkScalerContext::kLCD_Vertical_Flag) { 252 if (rec->fFlags & SkScalerContext::kLCD_Vertical_Flag) {
254 rec->fMaskFormat = SkMask::kA8_Format; 253 rec->fMaskFormat = SkMask::kA8_Format;
255 } 254 }
256 255
257 unsigned flagsWeDontSupport = SkScalerContext::kVertical_Flag | 256 unsigned flagsWeDontSupport = SkScalerContext::kVertical_Flag |
258 SkScalerContext::kDevKernText_Flag | 257 SkScalerContext::kDevKernText_Flag |
259 SkScalerContext::kForceAutohinting_Flag | 258 SkScalerContext::kForceAutohinting_Flag |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 glyphCount, 455 glyphCount,
457 glyphIDs, 456 glyphIDs,
458 glyphIDsCount, 457 glyphIDsCount,
459 getWidthAdvance)); 458 getWidthAdvance));
460 } 459 }
461 } 460 }
462 461
463 return info; 462 return info;
464 } 463 }
465 #endif//defined(SK_BUILD_FOR_WIN32) 464 #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