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

Side by Side Diff: src/core/SkScalerContext.cpp

Issue 18484005: allow createScalerContext to return null, and then have the GDI backend trigger that if we fail to … (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 | « src/core/SkGlyphCache.cpp ('k') | src/ports/SkFontHost_win.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 #include "SkScalerContext.h" 10 #include "SkScalerContext.h"
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 sk_bzero(mx, sizeof(*mx)); 845 sk_bzero(mx, sizeof(*mx));
846 } 846 }
847 if (my) { 847 if (my) {
848 sk_bzero(my, sizeof(*my)); 848 sk_bzero(my, sizeof(*my));
849 } 849 }
850 } 850 }
851 }; 851 };
852 852
853 extern SkScalerContext* SkCreateColorScalerContext(const SkDescriptor* desc); 853 extern SkScalerContext* SkCreateColorScalerContext(const SkDescriptor* desc);
854 854
855 SkScalerContext* SkTypeface::createScalerContext(const SkDescriptor* desc) const { 855 SkScalerContext* SkTypeface::createScalerContext(const SkDescriptor* desc,
856 SkScalerContext* c = NULL; //SkCreateColorScalerContext(desc); 856 bool allowFailure) const {
857 if (NULL == c) { 857 SkScalerContext* c = this->onCreateScalerContext(desc);
858 c = this->onCreateScalerContext(desc); 858
859 } 859 if (!c && !allowFailure) {
860 if (NULL == c) {
861 c = SkNEW_ARGS(SkScalerContext_Empty, 860 c = SkNEW_ARGS(SkScalerContext_Empty,
862 (const_cast<SkTypeface*>(this), desc)); 861 (const_cast<SkTypeface*>(this), desc));
863 } 862 }
864 return c; 863 return c;
865 } 864 }
865
OLDNEW
« no previous file with comments | « src/core/SkGlyphCache.cpp ('k') | src/ports/SkFontHost_win.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698