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

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

Issue 12462008: Add GrEllipseEdgeEffect (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: rebase again Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrSWMaskHelper.cpp ('k') | src/gpu/effects/GrEllipseEdgeEffect.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 8
9 9
10 #include "GrTextContext.h" 10 #include "GrTextContext.h"
11 #include "GrAtlas.h" 11 #include "GrAtlas.h"
12 #include "GrContext.h" 12 #include "GrContext.h"
13 #include "GrDrawTarget.h" 13 #include "GrDrawTarget.h"
14 #include "GrFontScaler.h" 14 #include "GrFontScaler.h"
15 #include "GrIndexBuffer.h" 15 #include "GrIndexBuffer.h"
16 #include "GrTextStrike.h" 16 #include "GrTextStrike.h"
17 #include "GrTextStrike_impl.h" 17 #include "GrTextStrike_impl.h"
18 #include "SkPath.h" 18 #include "SkPath.h"
19 #include "SkStrokeRec.h" 19 #include "SkStrokeRec.h"
20 20
21 enum { 21 enum {
22 // glyph rendering shares this stage with edge rendering
23 // (kEdgeEffectStage in GrContext) && SW path rendering
24 // (kPathMaskStage in GrSWMaskHelper)
22 kGlyphMaskStage = GrPaint::kTotalStages, 25 kGlyphMaskStage = GrPaint::kTotalStages,
23 }; 26 };
24 27
25 void GrTextContext::flushGlyphs() { 28 void GrTextContext::flushGlyphs() {
26 if (NULL == fDrawTarget) { 29 if (NULL == fDrawTarget) {
27 return; 30 return;
28 } 31 }
29 GrDrawState* drawState = fDrawTarget->drawState(); 32 GrDrawState* drawState = fDrawTarget->drawState();
30 if (fCurrVertex > 0) { 33 if (fCurrVertex > 0) {
31 // setup our sampler state for our text texture/atlas 34 // setup our sampler state for our text texture/atlas
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 SkFixedToFloat(vx + width), 244 SkFixedToFloat(vx + width),
242 SkFixedToFloat(vy + height), 245 SkFixedToFloat(vy + height),
243 2 * sizeof(SkPoint)); 246 2 * sizeof(SkPoint));
244 fVertices[2*fCurrVertex+1].setRectFan(SkFixedToFloat(texture->normalizeFixed X(tx)), 247 fVertices[2*fCurrVertex+1].setRectFan(SkFixedToFloat(texture->normalizeFixed X(tx)),
245 SkFixedToFloat(texture->normalizeFixed Y(ty)), 248 SkFixedToFloat(texture->normalizeFixed Y(ty)),
246 SkFixedToFloat(texture->normalizeFixed X(tx + width)), 249 SkFixedToFloat(texture->normalizeFixed X(tx + width)),
247 SkFixedToFloat(texture->normalizeFixed Y(ty + height)), 250 SkFixedToFloat(texture->normalizeFixed Y(ty + height)),
248 2 * sizeof(SkPoint)); 251 2 * sizeof(SkPoint));
249 fCurrVertex += 4; 252 fCurrVertex += 4;
250 } 253 }
OLDNEW
« no previous file with comments | « src/gpu/GrSWMaskHelper.cpp ('k') | src/gpu/effects/GrEllipseEdgeEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698