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

Side by Side Diff: src/core/SkGlyphCache.h

Issue 18132009: move failable work outside of constructors for SkGlyphCache and SkScalerContextGDI. If we fail, try… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/core/SkGlyphCache.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkGlyphCache_DEFINED 10 #ifndef SkGlyphCache_DEFINED
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 178 }
179 } 179 }
180 void forget() { 180 void forget() {
181 fCache = NULL; 181 fCache = NULL;
182 } 182 }
183 private: 183 private:
184 const SkGlyphCache* fCache; 184 const SkGlyphCache* fCache;
185 }; 185 };
186 186
187 private: 187 private:
188 SkGlyphCache(SkTypeface*, const SkDescriptor*); 188 // we take ownership of the scalercontext
189 SkGlyphCache(SkTypeface*, const SkDescriptor*, SkScalerContext*);
189 ~SkGlyphCache(); 190 ~SkGlyphCache();
190 191
191 enum MetricsType { 192 enum MetricsType {
192 kJustAdvance_MetricsType, 193 kJustAdvance_MetricsType,
193 kFull_MetricsType 194 kFull_MetricsType
194 }; 195 };
195 196
196 SkGlyph* lookupMetrics(uint32_t id, MetricsType); 197 SkGlyph* lookupMetrics(uint32_t id, MetricsType);
197 static bool DetachProc(const SkGlyphCache*, void*) { return true; } 198 static bool DetachProc(const SkGlyphCache*, void*) { return true; }
198 199
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 } 292 }
292 } 293 }
293 294
294 private: 295 private:
295 SkGlyphCache* fCache; 296 SkGlyphCache* fCache;
296 297
297 static bool DetachProc(const SkGlyphCache*, void*); 298 static bool DetachProc(const SkGlyphCache*, void*);
298 }; 299 };
299 300
300 #endif 301 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkGlyphCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698