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

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

Issue 844193007: And change SkAutoTUnref<const SkStream to SkAutoTDelete. (Closed) Base URL: https://skia.googlesource.com/skia.git@fixLinux
Patch Set: Created 5 years, 11 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 | « 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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 "SkFontHost.h" 8 #include "SkFontHost.h"
9 #include "SkFontHost_FreeType_common.h" 9 #include "SkFontHost_FreeType_common.h"
10 #include "SkFontDescriptor.h" 10 #include "SkFontDescriptor.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 const char* getUniqueString() const SK_OVERRIDE { return NULL; } 91 const char* getUniqueString() const SK_OVERRIDE { return NULL; }
92 92
93 protected: 93 protected:
94 SkStream* onOpenStream(int* ttcIndex) const SK_OVERRIDE { 94 SkStream* onOpenStream(int* ttcIndex) const SK_OVERRIDE {
95 *ttcIndex = this->getIndex(); 95 *ttcIndex = this->getIndex();
96 return fStream->duplicate(); 96 return fStream->duplicate();
97 } 97 }
98 98
99 private: 99 private:
100 const SkAutoTUnref<const SkStream> fStream; 100 const SkAutoTDelete<const SkStream> fStream;
101 101
102 typedef SkTypeface_Custom INHERITED; 102 typedef SkTypeface_Custom INHERITED;
103 }; 103 };
104 104
105 // This configuration option is useful if we need to open and hold handles to 105 // This configuration option is useful if we need to open and hold handles to
106 // all found system font data (e.g., for skfiddle, where the application can't 106 // all found system font data (e.g., for skfiddle, where the application can't
107 // access the filesystem to read fonts on demand) 107 // access the filesystem to read fonts on demand)
108 108
109 SK_CONF_DECLARE(bool, c_CustomTypefaceRetain, "fonts.customFont.retainAllData", false, 109 SK_CONF_DECLARE(bool, c_CustomTypefaceRetain, "fonts.customFont.retainAllData", false,
110 "Retain the open stream for each found font on the system."); 110 "Retain the open stream for each found font on the system.");
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 430
431 SkTArray<SkAutoTUnref<SkFontStyleSet_Custom>, true> fFamilies; 431 SkTArray<SkAutoTUnref<SkFontStyleSet_Custom>, true> fFamilies;
432 SkFontStyleSet_Custom* gDefaultFamily; 432 SkFontStyleSet_Custom* gDefaultFamily;
433 SkTypeface* gDefaultNormal; 433 SkTypeface* gDefaultNormal;
434 SkTypeface_FreeType::Scanner fScanner; 434 SkTypeface_FreeType::Scanner fScanner;
435 }; 435 };
436 436
437 SkFontMgr* SkFontMgr::Factory() { 437 SkFontMgr* SkFontMgr::Factory() {
438 return new SkFontMgr_Custom(SK_FONT_FILE_PREFIX); 438 return new SkFontMgr_Custom(SK_FONT_FILE_PREFIX);
439 } 439 }
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