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

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

Issue 488143002: Replace SkTypeface::Style with SkFontStyle. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add expectations, remove whitespace. Created 6 years, 2 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/SkFontMgr_fontconfig.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 "SkFontMgr.h" 10 #include "SkFontMgr.h"
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 same = (iunkA.get() == iunkB.get()); 324 same = (iunkA.get() == iunkB.get());
325 return S_OK; 325 return S_OK;
326 } 326 }
327 327
328 struct ProtoDWriteTypeface { 328 struct ProtoDWriteTypeface {
329 IDWriteFontFace* fDWriteFontFace; 329 IDWriteFontFace* fDWriteFontFace;
330 IDWriteFont* fDWriteFont; 330 IDWriteFont* fDWriteFont;
331 IDWriteFontFamily* fDWriteFontFamily; 331 IDWriteFontFamily* fDWriteFontFamily;
332 }; 332 };
333 333
334 static bool FindByDWriteFont(SkTypeface* cached, SkTypeface::Style, void* ctx) { 334 static bool FindByDWriteFont(SkTypeface* cached, const SkFontStyle&, void* ctx) {
335 DWriteFontTypeface* cshFace = reinterpret_cast<DWriteFontTypeface*>(cached); 335 DWriteFontTypeface* cshFace = reinterpret_cast<DWriteFontTypeface*>(cached);
336 ProtoDWriteTypeface* ctxFace = reinterpret_cast<ProtoDWriteTypeface*>(ctx); 336 ProtoDWriteTypeface* ctxFace = reinterpret_cast<ProtoDWriteTypeface*>(ctx);
337 bool same; 337 bool same;
338 338
339 //Check to see if the two fonts are identical. 339 //Check to see if the two fonts are identical.
340 HRB(are_same(cshFace->fDWriteFont.get(), ctxFace->fDWriteFont, same)); 340 HRB(are_same(cshFace->fDWriteFont.get(), ctxFace->fDWriteFont, same));
341 if (same) { 341 if (same) {
342 return true; 342 return true;
343 } 343 }
344 344
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 } 755 }
756 756
757 #include "SkFontMgr_indirect.h" 757 #include "SkFontMgr_indirect.h"
758 SK_API SkFontMgr* SkFontMgr_New_DirectWriteRenderer(SkRemotableFontMgr* proxy) { 758 SK_API SkFontMgr* SkFontMgr_New_DirectWriteRenderer(SkRemotableFontMgr* proxy) {
759 SkAutoTUnref<SkFontMgr> impl(SkFontMgr_New_DirectWrite()); 759 SkAutoTUnref<SkFontMgr> impl(SkFontMgr_New_DirectWrite());
760 if (impl.get() == NULL) { 760 if (impl.get() == NULL) {
761 return NULL; 761 return NULL;
762 } 762 }
763 return SkNEW_ARGS(SkFontMgr_Indirect, (impl.get(), proxy)); 763 return SkNEW_ARGS(SkFontMgr_Indirect, (impl.get(), proxy));
764 } 764 }
OLDNEW
« no previous file with comments | « src/ports/SkFontMgr_fontconfig.cpp ('k') | src/ports/SkTypeface_win_dw.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698