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

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

Issue 1863013003: Pass effects directly to fontcache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: name the empty effects 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,
207 const SkDescriptor* desc) 208 const SkDescriptor* desc)
208 : SkScalerContext(typeface, desc) 209 : SkScalerContext(typeface, effects, desc)
209 , fTypeface(SkRef(typeface)) 210 , fTypeface(SkRef(typeface))
210 , fGlyphCount(-1) { 211 , fGlyphCount(-1) {
211 212
212 // In general, all glyphs should use CLEARTYPE_NATURAL_SYMMETRIC 213 // In general, all glyphs should use CLEARTYPE_NATURAL_SYMMETRIC
213 // except when bi-level rendering is requested or there are embedded 214 // except when bi-level rendering is requested or there are embedded
214 // bi-level bitmaps (and the embedded bitmap flag is set and no rotation). 215 // bi-level bitmaps (and the embedded bitmap flag is set and no rotation).
215 // 216 //
216 // DirectWrite's IDWriteFontFace::GetRecommendedRenderingMode does not do 217 // DirectWrite's IDWriteFontFace::GetRecommendedRenderingMode does not do
217 // this. As a result, determine the actual size of the text and then see if 218 // this. As a result, determine the actual size of the text and then see if
218 // there are any embedded bi-level bitmaps of that size. If there are, then 219 // 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
773 FALSE, //sideways 774 FALSE, //sideways
774 FALSE, //rtl 775 FALSE, //rtl
775 geometryToPath.get()), 776 geometryToPath.get()),
776 "Could not create glyph outline."); 777 "Could not create glyph outline.");
777 } 778 }
778 779
779 path->transform(fSkXform); 780 path->transform(fSkXform);
780 } 781 }
781 782
782 #endif//defined(SK_BUILD_FOR_WIN32) 783 #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