OLD | NEW |
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 SkDebugf(" frame %g miter %g hints %d framefill %d format %d join %d\n", | 106 SkDebugf(" frame %g miter %g hints %d framefill %d format %d join %d\n", |
107 rec->fFrameWidth, rec->fMiterLimit, rec->fHints, rec->fFrameAndFill, | 107 rec->fFrameWidth, rec->fMiterLimit, rec->fHints, rec->fFrameAndFill, |
108 rec->fMaskFormat, rec->fStrokeJoin); | 108 rec->fMaskFormat, rec->fStrokeJoin); |
109 SkDebugf(" pathEffect %x maskFilter %x\n", | 109 SkDebugf(" pathEffect %x maskFilter %x\n", |
110 desc->findEntry(kPathEffect_SkDescriptorTag, NULL), | 110 desc->findEntry(kPathEffect_SkDescriptorTag, NULL), |
111 desc->findEntry(kMaskFilter_SkDescriptorTag, NULL)); | 111 desc->findEntry(kMaskFilter_SkDescriptorTag, NULL)); |
112 #endif | 112 #endif |
113 #ifdef SK_BUILD_FOR_ANDROID | 113 #ifdef SK_BUILD_FOR_ANDROID |
114 uint32_t len; | 114 uint32_t len; |
115 const void* data = desc->findEntry(kAndroidOpts_SkDescriptorTag, &len); | 115 const void* data = desc->findEntry(kAndroidOpts_SkDescriptorTag, &len); |
116 SkASSERT(data); | 116 if (data) { |
117 SkOrderedReadBuffer buffer(data, len); | 117 SkOrderedReadBuffer buffer(data, len); |
118 fPaintOptionsAndroid.unflatten(buffer); | 118 fPaintOptionsAndroid.unflatten(buffer); |
119 SkASSERT(buffer.offset() == buffer.size()); | 119 SkASSERT(buffer.offset() == buffer.size()); |
| 120 } |
120 #endif | 121 #endif |
121 } | 122 } |
122 | 123 |
123 SkScalerContext::~SkScalerContext() { | 124 SkScalerContext::~SkScalerContext() { |
124 SkDELETE(fNextContext); | 125 SkDELETE(fNextContext); |
125 | 126 |
126 SkSafeUnref(fPathEffect); | 127 SkSafeUnref(fPathEffect); |
127 SkSafeUnref(fMaskFilter); | 128 SkSafeUnref(fMaskFilter); |
128 SkSafeUnref(fRasterizer); | 129 SkSafeUnref(fRasterizer); |
129 } | 130 } |
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 SkScalerContext* c = NULL; //SkCreateColorScalerContext(desc); | 859 SkScalerContext* c = NULL; //SkCreateColorScalerContext(desc); |
859 if (NULL == c) { | 860 if (NULL == c) { |
860 c = this->onCreateScalerContext(desc); | 861 c = this->onCreateScalerContext(desc); |
861 } | 862 } |
862 if (NULL == c) { | 863 if (NULL == c) { |
863 c = SkNEW_ARGS(SkScalerContext_Empty, | 864 c = SkNEW_ARGS(SkScalerContext_Empty, |
864 (const_cast<SkTypeface*>(this), desc)); | 865 (const_cast<SkTypeface*>(this), desc)); |
865 } | 866 } |
866 return c; | 867 return c; |
867 } | 868 } |
OLD | NEW |