| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 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 "SkTypes.h" | 8 #include "SkTypes.h" |
| 9 #if defined(SK_BUILD_FOR_WIN32) | 9 #if defined(SK_BUILD_FOR_WIN32) |
| 10 | 10 |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 } | 197 } |
| 198 | 198 |
| 199 // returns false if there is any non-90-rotation or skew | 199 // returns false if there is any non-90-rotation or skew |
| 200 static bool is_axis_aligned(const SkScalerContext::Rec& rec) { | 200 static bool is_axis_aligned(const SkScalerContext::Rec& rec) { |
| 201 return 0 == rec.fPreSkewX && | 201 return 0 == rec.fPreSkewX && |
| 202 (both_zero(rec.fPost2x2[0][1], rec.fPost2x2[1][0]) || | 202 (both_zero(rec.fPost2x2[0][1], rec.fPost2x2[1][0]) || |
| 203 both_zero(rec.fPost2x2[0][0], rec.fPost2x2[1][1])); | 203 both_zero(rec.fPost2x2[0][0], rec.fPost2x2[1][1])); |
| 204 } | 204 } |
| 205 | 205 |
| 206 SkScalerContext_DW::SkScalerContext_DW(DWriteFontTypeface* typeface, | 206 SkScalerContext_DW::SkScalerContext_DW(DWriteFontTypeface* typeface, |
| 207 const SkScalerContextEffects& effects, | |
| 208 const SkDescriptor* desc) | 207 const SkDescriptor* desc) |
| 209 : SkScalerContext(typeface, effects, desc) | 208 : SkScalerContext(typeface, desc) |
| 210 , fTypeface(SkRef(typeface)) | 209 , fTypeface(SkRef(typeface)) |
| 211 , fGlyphCount(-1) { | 210 , fGlyphCount(-1) { |
| 212 | 211 |
| 213 // In general, all glyphs should use CLEARTYPE_NATURAL_SYMMETRIC | 212 // In general, all glyphs should use CLEARTYPE_NATURAL_SYMMETRIC |
| 214 // except when bi-level rendering is requested or there are embedded | 213 // except when bi-level rendering is requested or there are embedded |
| 215 // bi-level bitmaps (and the embedded bitmap flag is set and no rotation). | 214 // bi-level bitmaps (and the embedded bitmap flag is set and no rotation). |
| 216 // | 215 // |
| 217 // DirectWrite's IDWriteFontFace::GetRecommendedRenderingMode does not do | 216 // DirectWrite's IDWriteFontFace::GetRecommendedRenderingMode does not do |
| 218 // this. As a result, determine the actual size of the text and then see if | 217 // this. As a result, determine the actual size of the text and then see if |
| 219 // there are any embedded bi-level bitmaps of that size. If there are, then | 218 // there are any embedded bi-level bitmaps of that size. If there are, then |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 FALSE, //sideways | 773 FALSE, //sideways |
| 775 FALSE, //rtl | 774 FALSE, //rtl |
| 776 geometryToPath.get()), | 775 geometryToPath.get()), |
| 777 "Could not create glyph outline."); | 776 "Could not create glyph outline."); |
| 778 } | 777 } |
| 779 | 778 |
| 780 path->transform(fSkXform); | 779 path->transform(fSkXform); |
| 781 } | 780 } |
| 782 | 781 |
| 783 #endif//defined(SK_BUILD_FOR_WIN32) | 782 #endif//defined(SK_BUILD_FOR_WIN32) |
| OLD | NEW |