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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp

Issue 2438643005: Replace SkAutoTUnref with sk_sp. (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | no next file » | 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 (c) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (c) 2006, 2007, 2008, 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "wtf/text/CString.h" 46 #include "wtf/text/CString.h"
47 #include <memory> 47 #include <memory>
48 #include <unicode/locid.h> 48 #include <unicode/locid.h>
49 49
50 #if !OS(WIN) && !OS(ANDROID) 50 #if !OS(WIN) && !OS(ANDROID)
51 #include "SkFontConfigInterface.h" 51 #include "SkFontConfigInterface.h"
52 52
53 static sk_sp<SkTypeface> typefaceForFontconfigInterfaceIdAndTtcIndex( 53 static sk_sp<SkTypeface> typefaceForFontconfigInterfaceIdAndTtcIndex(
54 int fontconfigInterfaceId, 54 int fontconfigInterfaceId,
55 int ttcIndex) { 55 int ttcIndex) {
56 SkAutoTUnref<SkFontConfigInterface> fci(SkFontConfigInterface::RefGlobal()); 56 sk_sp<SkFontConfigInterface> fci(SkFontConfigInterface::RefGlobal());
57 SkFontConfigInterface::FontIdentity fontIdentity; 57 SkFontConfigInterface::FontIdentity fontIdentity;
58 fontIdentity.fID = fontconfigInterfaceId; 58 fontIdentity.fID = fontconfigInterfaceId;
59 fontIdentity.fTTCIndex = ttcIndex; 59 fontIdentity.fTTCIndex = ttcIndex;
60 return fci->makeTypeface(fontIdentity); 60 return fci->makeTypeface(fontIdentity);
61 } 61 }
62 #endif 62 #endif
63 63
64 namespace blink { 64 namespace blink {
65 65
66 #if OS(ANDROID) || OS(LINUX) 66 #if OS(ANDROID) || OS(LINUX)
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 fontDescription.isSyntheticBold(), 263 fontDescription.isSyntheticBold(),
264 ((fontDescription.style() == FontStyleItalic || 264 ((fontDescription.style() == FontStyleItalic ||
265 fontDescription.style() == FontStyleOblique) && 265 fontDescription.style() == FontStyleOblique) &&
266 !tf->isItalic()) || 266 !tf->isItalic()) ||
267 fontDescription.isSyntheticItalic(), 267 fontDescription.isSyntheticItalic(),
268 fontDescription.orientation())); 268 fontDescription.orientation()));
269 } 269 }
270 #endif // !OS(WIN) 270 #endif // !OS(WIN)
271 271
272 } // namespace blink 272 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698