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

Side by Side Diff: src/gpu/GrTextContext.cpp

Issue 1214853025: Propagate SkSurfaceProps when known (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/device/xps/SkXPSDevice.cpp ('k') | src/pdf/SkPDFDevice.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 2010 Google Inc. 2 * Copyright 2010 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 "GrTextContext.h" 8 #include "GrTextContext.h"
9 #include "GrBlurUtils.h" 9 #include "GrBlurUtils.h"
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 SkScalar matrixScale = paint.setupForAsPaths(); 211 SkScalar matrixScale = paint.setupForAsPaths();
212 212
213 SkMatrix matrix; 213 SkMatrix matrix;
214 matrix.setScale(matrixScale, matrixScale); 214 matrix.setScale(matrixScale, matrixScale);
215 215
216 // Temporarily jam in kFill, so we only ever ask for the raw outline from th e cache. 216 // Temporarily jam in kFill, so we only ever ask for the raw outline from th e cache.
217 paint.setStyle(SkPaint::kFill_Style); 217 paint.setStyle(SkPaint::kFill_Style);
218 paint.setPathEffect(NULL); 218 paint.setPathEffect(NULL);
219 219
220 SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc(); 220 SkDrawCacheProc glyphCacheProc = paint.getDrawCacheProc();
221 SkAutoGlyphCache autoCache(paint, NULL, NULL); 221 SkAutoGlyphCache autoCache(paint, &fSurfaceProps, NULL);
222 SkGlyphCache* cache = autoCache.getCache(); 222 SkGlyphCache* cache = autoCache.getCache();
223 223
224 const char* stop = text + byteLength; 224 const char* stop = text + byteLength;
225 SkTextAlignProc alignProc(paint.getTextAlign()); 225 SkTextAlignProc alignProc(paint.getTextAlign());
226 SkTextMapStateProc tmsProc(SkMatrix::I(), offset, scalarsPerPosition); 226 SkTextMapStateProc tmsProc(SkMatrix::I(), offset, scalarsPerPosition);
227 227
228 // Now restore the original settings, so we "draw" with whatever style/strok ing. 228 // Now restore the original settings, so we "draw" with whatever style/strok ing.
229 paint.setStyle(origPaint.getStyle()); 229 paint.setStyle(origPaint.getStyle());
230 paint.setPathEffect(origPaint.getPathEffect()); 230 paint.setPathEffect(origPaint.getPathEffect());
231 231
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 if (cache->getAuxProcData(GlyphCacheAuxProc, &auxData)) { 286 if (cache->getAuxProcData(GlyphCacheAuxProc, &auxData)) {
287 scaler = (GrFontScaler*)auxData; 287 scaler = (GrFontScaler*)auxData;
288 } 288 }
289 if (NULL == scaler) { 289 if (NULL == scaler) {
290 scaler = SkNEW_ARGS(GrFontScaler, (cache)); 290 scaler = SkNEW_ARGS(GrFontScaler, (cache));
291 cache->setAuxProc(GlyphCacheAuxProc, scaler); 291 cache->setAuxProc(GlyphCacheAuxProc, scaler);
292 } 292 }
293 293
294 return scaler; 294 return scaler;
295 } 295 }
OLDNEW
« no previous file with comments | « src/device/xps/SkXPSDevice.cpp ('k') | src/pdf/SkPDFDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698