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

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

Issue 145023006: Revert of Add factory class for generating various flavors of GrTextContext. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 11 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/gpu/GrBitmapTextContext.cpp ('k') | src/gpu/GrTextContext.cpp » ('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 2013 Google Inc. 2 * Copyright 2013 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 "GrDistanceFieldTextContext.h" 8 #include "GrDistanceFieldTextContext.h"
9 #include "GrAtlas.h" 9 #include "GrAtlas.h"
10 #include "GrDrawTarget.h" 10 #include "GrDrawTarget.h"
(...skipping 10 matching lines...) Expand all
21 static const int kGlyphCoordsAttributeIndex = 1; 21 static const int kGlyphCoordsAttributeIndex = 1;
22 22
23 static const int kBaseDFFontSize = 32; 23 static const int kBaseDFFontSize = 32;
24 24
25 SK_CONF_DECLARE(bool, c_DumpFontCache, "gpu.dumpFontCache", false, 25 SK_CONF_DECLARE(bool, c_DumpFontCache, "gpu.dumpFontCache", false,
26 "Dump the contents of the font cache before every purge."); 26 "Dump the contents of the font cache before every purge.");
27 27
28 GrDistanceFieldTextContext::GrDistanceFieldTextContext(GrContext* context, 28 GrDistanceFieldTextContext::GrDistanceFieldTextContext(GrContext* context,
29 const GrPaint& grPaint, 29 const GrPaint& grPaint,
30 const SkPaint& skPaint) 30 const SkPaint& skPaint)
31 : GrTextContext(context, gr Paint, skPaint) { 31 : GrTextContext(context, gr Paint),
32 fSkPaint(skPaint) {
32 fStrike = NULL; 33 fStrike = NULL;
33 34
34 fCurrTexture = NULL; 35 fCurrTexture = NULL;
35 fCurrVertex = 0; 36 fCurrVertex = 0;
36 37
37 fVertices = NULL; 38 fVertices = NULL;
38 fMaxVertices = 0; 39 fMaxVertices = 0;
39 40
40 fTextRatio = fSkPaint.getTextSize()/kBaseDFFontSize; 41 fTextRatio = fSkPaint.getTextSize()/kBaseDFFontSize;
41 42
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 SkScalarToFixed(x) - (glyph.fAdvanceX >> a lignShift) 398 SkScalarToFixed(x) - (glyph.fAdvanceX >> a lignShift)
398 + SK_FixedHalf, //d1g.fHalfSampleX, 399 + SK_FixedHalf, //d1g.fHalfSampleX,
399 SkScalarToFixed(y) - (glyph.fAdvanceY >> a lignShift) 400 SkScalarToFixed(y) - (glyph.fAdvanceY >> a lignShift)
400 + SK_FixedHalf, //d1g.fHalfSampleY, 401 + SK_FixedHalf, //d1g.fHalfSampleY,
401 fontScaler); 402 fontScaler);
402 } 403 }
403 pos += scalarsPerPosition; 404 pos += scalarsPerPosition;
404 } 405 }
405 } 406 }
406 } 407 }
OLDNEW
« no previous file with comments | « src/gpu/GrBitmapTextContext.cpp ('k') | src/gpu/GrTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698