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

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

Issue 860353005: Remove another caller of SkRef(SkStream) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 private: 78 private:
79 typedef SkTypeface_Custom INHERITED; 79 typedef SkTypeface_Custom INHERITED;
80 }; 80 };
81 81
82 /** The stream SkTypeface implementation for the custom font manager. */ 82 /** The stream SkTypeface implementation for the custom font manager. */
83 class SkTypeface_Stream : public SkTypeface_Custom { 83 class SkTypeface_Stream : public SkTypeface_Custom {
84 public: 84 public:
85 SkTypeface_Stream(const SkFontStyle& style, bool isFixedPitch, bool sysFont, 85 SkTypeface_Stream(const SkFontStyle& style, bool isFixedPitch, bool sysFont,
86 const SkString familyName, SkStream* stream, int index) 86 const SkString familyName, SkStream* stream, int index)
87 : INHERITED(style, isFixedPitch, sysFont, familyName, index) 87 : INHERITED(style, isFixedPitch, sysFont, familyName, index)
88 , fStream(SkRef(stream)) 88 , fStream(stream)
89 { } 89 { }
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
(...skipping 331 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