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

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

Issue 1872253004: Revert of Pass effects directly to fontcache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | « src/ports/SkScalerContext_win_dw.h ('k') | src/ports/SkTypeface_win_dw.h » ('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 * 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
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
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)
OLDNEW
« no previous file with comments | « src/ports/SkScalerContext_win_dw.h ('k') | src/ports/SkTypeface_win_dw.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698