reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 1 | /* |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 2 | * Copyright 2010 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 9 | |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 10 | #include "GrTextContext.h" |
bsalomon@google.com | 86afc2a | 2011-02-16 16:12:19 +0000 | [diff] [blame] | 11 | #include "GrAtlas.h" |
| 12 | #include "GrContext.h" |
bsalomon@google.com | f4a9c82 | 2012-03-16 14:02:46 +0000 | [diff] [blame] | 13 | #include "GrDrawTarget.h" |
| 14 | #include "GrFontScaler.h" |
| 15 | #include "GrGpuVertex.h" |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 16 | #include "GrIndexBuffer.h" |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 17 | #include "GrTextStrike.h" |
| 18 | #include "GrTextStrike_impl.h" |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 19 | #include "SkPath.h" |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 20 | |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 21 | enum { |
| 22 | kGlyphMaskStage = GrPaint::kTotalStages, |
| 23 | }; |
| 24 | |
| 25 | void GrTextContext::flushGlyphs() { |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 26 | if (fCurrVertex > 0) { |
bsalomon@google.com | 8f9cbd6 | 2011-12-09 15:55:34 +0000 | [diff] [blame] | 27 | GrDrawState* drawState = fDrawTarget->drawState(); |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 28 | // setup our sampler state for our text texture/atlas |
bsalomon@google.com | 6aef1fb | 2011-05-05 12:33:22 +0000 | [diff] [blame] | 29 | GrSamplerState::Filter filter; |
| 30 | if (fExtMatrix.isIdentity()) { |
| 31 | filter = GrSamplerState::kNearest_Filter; |
| 32 | } else { |
| 33 | filter = GrSamplerState::kBilinear_Filter; |
| 34 | } |
bsalomon@google.com | 1e266f8 | 2011-12-12 16:11:33 +0000 | [diff] [blame] | 35 | drawState->sampler(kGlyphMaskStage)->reset( |
| 36 | GrSamplerState::kRepeat_WrapMode,filter); |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 37 | |
| 38 | GrAssert(GrIsALIGN4(fCurrVertex)); |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 39 | GrAssert(fCurrTexture); |
bsalomon@google.com | 8f9cbd6 | 2011-12-09 15:55:34 +0000 | [diff] [blame] | 40 | drawState->setTexture(kGlyphMaskStage, fCurrTexture); |
bsalomon@google.com | 080773c | 2011-03-15 19:09:25 +0000 | [diff] [blame] | 41 | |
bsalomon@google.com | 669fdc4 | 2011-04-05 17:08:27 +0000 | [diff] [blame] | 42 | if (!GrPixelConfigIsAlphaOnly(fCurrTexture->config())) { |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 43 | if (kOne_GrBlendCoeff != fPaint.fSrcBlendCoeff || |
| 44 | kISA_GrBlendCoeff != fPaint.fDstBlendCoeff || |
| 45 | fPaint.hasTexture()) { |
bsalomon@google.com | 080773c | 2011-03-15 19:09:25 +0000 | [diff] [blame] | 46 | GrPrintf("LCD Text will not draw correctly.\n"); |
| 47 | } |
| 48 | // setup blend so that we get mask * paintColor + (1-mask)*dstColor |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 49 | drawState->setBlendConstant(fPaint.fColor); |
bsalomon@google.com | 4705954 | 2012-06-06 20:51:20 +0000 | [diff] [blame] | 50 | drawState->setBlendFunc(kConstC_GrBlendCoeff, kISC_GrBlendCoeff); |
bsalomon@google.com | 080773c | 2011-03-15 19:09:25 +0000 | [diff] [blame] | 51 | // don't modulate by the paint's color in the frag since we're |
| 52 | // already doing it via the blend const. |
bsalomon@google.com | 8f9cbd6 | 2011-12-09 15:55:34 +0000 | [diff] [blame] | 53 | drawState->setColor(0xffffffff); |
bsalomon@google.com | 080773c | 2011-03-15 19:09:25 +0000 | [diff] [blame] | 54 | } else { |
| 55 | // set back to normal in case we took LCD path previously. |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 56 | drawState->setBlendFunc(fPaint.fSrcBlendCoeff, |
| 57 | fPaint.fDstBlendCoeff); |
| 58 | drawState->setColor(fPaint.fColor); |
bsalomon@google.com | 080773c | 2011-03-15 19:09:25 +0000 | [diff] [blame] | 59 | } |
| 60 | |
bsalomon@google.com | 934c570 | 2012-03-20 21:17:58 +0000 | [diff] [blame] | 61 | int nGlyphs = fCurrVertex / 4; |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 62 | fDrawTarget->setIndexSourceToBuffer(fContext->getQuadIndexBuffer()); |
bsalomon@google.com | 4705954 | 2012-06-06 20:51:20 +0000 | [diff] [blame] | 63 | fDrawTarget->drawIndexedInstances(kTriangles_GrPrimitiveType, |
bsalomon@google.com | 934c570 | 2012-03-20 21:17:58 +0000 | [diff] [blame] | 64 | nGlyphs, |
| 65 | 4, 6); |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 66 | fDrawTarget->resetVertexSource(); |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 67 | fVertices = NULL; |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 68 | fMaxVertices = 0; |
| 69 | fCurrVertex = 0; |
| 70 | GrSafeSetNull(fCurrTexture); |
robertphillips@google.com | 972265d | 2012-06-13 18:49:30 +0000 | [diff] [blame] | 71 | drawState->setTexture(kGlyphMaskStage, NULL); |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 72 | } |
| 73 | } |
| 74 | |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 75 | GrTextContext::GrTextContext(GrContext* context, |
| 76 | const GrPaint& paint, |
| 77 | const GrMatrix* extMatrix) : fPaint(paint) { |
| 78 | fContext = context; |
bsalomon@google.com | f4a9c82 | 2012-03-16 14:02:46 +0000 | [diff] [blame] | 79 | fStrike = NULL; |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 80 | |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 81 | fCurrTexture = NULL; |
| 82 | fCurrVertex = 0; |
| 83 | |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 84 | if (NULL != extMatrix) { |
| 85 | fExtMatrix = *extMatrix; |
| 86 | } else { |
bsalomon@google.com | 022a3e1 | 2012-03-16 15:41:40 +0000 | [diff] [blame] | 87 | fExtMatrix.reset(); |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 88 | } |
bsalomon@google.com | 0b50b2e | 2011-03-08 21:07:21 +0000 | [diff] [blame] | 89 | if (context->getClip().hasConservativeBounds()) { |
bsalomon@google.com | d302f14 | 2011-03-03 13:54:13 +0000 | [diff] [blame] | 90 | if (!fExtMatrix.isIdentity()) { |
| 91 | GrMatrix inverse; |
bsalomon@google.com | 0b50b2e | 2011-03-08 21:07:21 +0000 | [diff] [blame] | 92 | GrRect r = context->getClip().getConservativeBounds(); |
bsalomon@google.com | d302f14 | 2011-03-03 13:54:13 +0000 | [diff] [blame] | 93 | if (fExtMatrix.invert(&inverse)) { |
| 94 | inverse.mapRect(&r); |
| 95 | r.roundOut(&fClipRect); |
| 96 | } |
| 97 | } else { |
bsalomon@google.com | 0b50b2e | 2011-03-08 21:07:21 +0000 | [diff] [blame] | 98 | context->getClip().getConservativeBounds().roundOut(&fClipRect); |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 99 | } |
bsalomon@google.com | d302f14 | 2011-03-03 13:54:13 +0000 | [diff] [blame] | 100 | } else { |
| 101 | fClipRect.setLargest(); |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 102 | } |
| 103 | |
bsalomon@google.com | 7d34d2e | 2011-01-24 17:41:47 +0000 | [diff] [blame] | 104 | // save the context's original matrix off and restore in destructor |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 105 | // this must be done before getTextTarget. |
bsalomon@google.com | 5782d71 | 2011-01-21 21:03:59 +0000 | [diff] [blame] | 106 | fOrigViewMatrix = fContext->getMatrix(); |
| 107 | fContext->setMatrix(fExtMatrix); |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 108 | |
bsalomon@google.com | 3914958 | 2011-06-13 21:55:32 +0000 | [diff] [blame] | 109 | /* |
| 110 | We need to call preConcatMatrix with our viewmatrix's inverse, for each |
| 111 | texture and mask in the paint. However, computing the inverse can be |
| 112 | expensive, and its possible we may not have any textures or masks, so these |
| 113 | two loops are written such that we only compute the inverse (once) if we |
| 114 | need it. We do this on our copy of the paint rather than directly on the |
| 115 | draw target because we re-provide the paint to the context when we have |
| 116 | to flush our glyphs or draw a glyph as a path midstream. |
| 117 | */ |
| 118 | bool invVMComputed = false; |
| 119 | GrMatrix invVM; |
| 120 | for (int t = 0; t < GrPaint::kMaxTextures; ++t) { |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 121 | if (fPaint.isTextureStageEnabled(t)) { |
bsalomon@google.com | 3914958 | 2011-06-13 21:55:32 +0000 | [diff] [blame] | 122 | if (invVMComputed || fOrigViewMatrix.invert(&invVM)) { |
| 123 | invVMComputed = true; |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 124 | fPaint.textureSampler(t)->preConcatMatrix(invVM); |
bsalomon@google.com | 3914958 | 2011-06-13 21:55:32 +0000 | [diff] [blame] | 125 | } |
| 126 | } |
| 127 | } |
| 128 | for (int m = 0; m < GrPaint::kMaxMasks; ++m) { |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 129 | if (fPaint.isMaskStageEnabled(m)) { |
bsalomon@google.com | 3914958 | 2011-06-13 21:55:32 +0000 | [diff] [blame] | 130 | if (invVMComputed || fOrigViewMatrix.invert(&invVM)) { |
| 131 | invVMComputed = true; |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 132 | fPaint.maskSampler(m)->preConcatMatrix(invVM); |
bsalomon@google.com | 3914958 | 2011-06-13 21:55:32 +0000 | [diff] [blame] | 133 | } |
| 134 | } |
| 135 | } |
| 136 | |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 137 | fDrawTarget = fContext->getTextTarget(fPaint); |
bsalomon@google.com | 7d34d2e | 2011-01-24 17:41:47 +0000 | [diff] [blame] | 138 | |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 139 | fVertices = NULL; |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 140 | fMaxVertices = 0; |
bsalomon@google.com | 26c2d0a | 2011-05-17 20:15:30 +0000 | [diff] [blame] | 141 | |
| 142 | fVertexLayout = |
| 143 | GrDrawTarget::kTextFormat_VertexLayoutBit | |
| 144 | GrDrawTarget::StageTexCoordVertexLayoutBit(kGlyphMaskStage, 0); |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 145 | } |
| 146 | |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 147 | GrTextContext::~GrTextContext() { |
| 148 | this->flushGlyphs(); |
| 149 | if (fDrawTarget) { |
| 150 | fDrawTarget->drawState()->disableStages(); |
| 151 | } |
bsalomon@google.com | 5782d71 | 2011-01-21 21:03:59 +0000 | [diff] [blame] | 152 | fContext->setMatrix(fOrigViewMatrix); |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 153 | } |
| 154 | |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 155 | void GrTextContext::flush() { |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 156 | this->flushGlyphs(); |
| 157 | } |
| 158 | |
| 159 | static inline void setRectFan(GrGpuTextVertex v[4], int l, int t, int r, int b, |
| 160 | int stride) { |
| 161 | v[0 * stride].setI(l, t); |
| 162 | v[1 * stride].setI(l, b); |
| 163 | v[2 * stride].setI(r, b); |
| 164 | v[3 * stride].setI(r, t); |
| 165 | } |
| 166 | |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 167 | void GrTextContext::drawPackedGlyph(GrGlyph::PackedID packed, |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 168 | GrFixed vx, GrFixed vy, |
| 169 | GrFontScaler* scaler) { |
| 170 | if (NULL == fStrike) { |
| 171 | fStrike = fContext->getFontCache()->getStrike(scaler); |
| 172 | } |
| 173 | |
| 174 | GrGlyph* glyph = fStrike->getGlyph(packed, scaler); |
| 175 | if (NULL == glyph || glyph->fBounds.isEmpty()) { |
| 176 | return; |
| 177 | } |
| 178 | |
| 179 | vx += GrIntToFixed(glyph->fBounds.fLeft); |
| 180 | vy += GrIntToFixed(glyph->fBounds.fTop); |
| 181 | |
| 182 | // keep them as ints until we've done the clip-test |
| 183 | GrFixed width = glyph->fBounds.width(); |
| 184 | GrFixed height = glyph->fBounds.height(); |
| 185 | |
| 186 | // check if we clipped out |
| 187 | if (true || NULL == glyph->fAtlas) { |
| 188 | int x = vx >> 16; |
| 189 | int y = vy >> 16; |
| 190 | if (fClipRect.quickReject(x, y, x + width, y + height)) { |
| 191 | // Gr_clz(3); // so we can set a break-point in the debugger |
| 192 | return; |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | if (NULL == glyph->fAtlas) { |
| 197 | if (fStrike->getGlyphAtlas(glyph, scaler)) { |
| 198 | goto HAS_ATLAS; |
| 199 | } |
reed@google.com | 0ebe81a | 2011-04-04 20:06:59 +0000 | [diff] [blame] | 200 | |
| 201 | // before we purge the cache, we must flush any accumulated draws |
| 202 | this->flushGlyphs(); |
bsalomon@google.com | 193395c | 2012-03-30 17:35:12 +0000 | [diff] [blame] | 203 | fContext->flush(); |
reed@google.com | 313e403 | 2010-12-22 22:16:59 +0000 | [diff] [blame] | 204 | |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 205 | // try to purge |
| 206 | fContext->getFontCache()->purgeExceptFor(fStrike); |
| 207 | if (fStrike->getGlyphAtlas(glyph, scaler)) { |
| 208 | goto HAS_ATLAS; |
| 209 | } |
| 210 | |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 211 | if (NULL == glyph->fPath) { |
tomhudson@google.com | c377baf | 2012-07-09 20:17:56 +0000 | [diff] [blame^] | 212 | SkPath* path = SkNEW(SkPath); |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 213 | if (!scaler->getGlyphPath(glyph->glyphID(), path)) { |
| 214 | // flag the glyph as being dead? |
| 215 | delete path; |
| 216 | return; |
| 217 | } |
| 218 | glyph->fPath = path; |
| 219 | } |
reed@google.com | 07f3ee1 | 2011-05-16 17:21:57 +0000 | [diff] [blame] | 220 | |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 221 | GrPoint translate; |
| 222 | translate.set(GrFixedToScalar(vx - GrIntToFixed(glyph->fBounds.fLeft)), |
| 223 | GrFixedToScalar(vy - GrIntToFixed(glyph->fBounds.fTop))); |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 224 | fContext->drawPath(fPaint, *glyph->fPath, kWinding_GrPathFill, |
bsalomon@google.com | 5782d71 | 2011-01-21 21:03:59 +0000 | [diff] [blame] | 225 | &translate); |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 226 | return; |
| 227 | } |
| 228 | |
| 229 | HAS_ATLAS: |
| 230 | GrAssert(glyph->fAtlas); |
| 231 | |
| 232 | // now promote them to fixed |
| 233 | width = GrIntToFixed(width); |
| 234 | height = GrIntToFixed(height); |
| 235 | |
| 236 | GrTexture* texture = glyph->fAtlas->texture(); |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 237 | GrAssert(texture); |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 238 | |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 239 | if (fCurrTexture != texture || fCurrVertex + 4 > fMaxVertices) { |
| 240 | this->flushGlyphs(); |
| 241 | fCurrTexture = texture; |
| 242 | fCurrTexture->ref(); |
| 243 | } |
| 244 | |
| 245 | if (NULL == fVertices) { |
| 246 | // If we need to reserve vertices allow the draw target to suggest |
| 247 | // a number of verts to reserve and whether to perform a flush. |
| 248 | fMaxVertices = kMinRequestedVerts; |
| 249 | bool flush = fDrawTarget->geometryHints(fVertexLayout, |
| 250 | &fMaxVertices, |
| 251 | NULL); |
| 252 | if (flush) { |
| 253 | this->flushGlyphs(); |
| 254 | fContext->flush(); |
| 255 | fDrawTarget = fContext->getTextTarget(fPaint); |
| 256 | fMaxVertices = kDefaultRequestedVerts; |
| 257 | // ignore return, no point in flushing again. |
| 258 | fDrawTarget->geometryHints(fVertexLayout, |
| 259 | &fMaxVertices, |
| 260 | NULL); |
| 261 | } |
| 262 | |
| 263 | int maxQuadVertices = 4 * fContext->getQuadIndexBuffer()->maxQuads(); |
| 264 | if (fMaxVertices < kMinRequestedVerts) { |
| 265 | fMaxVertices = kDefaultRequestedVerts; |
| 266 | } else if (fMaxVertices > maxQuadVertices) { |
| 267 | // don't exceed the limit of the index buffer |
| 268 | fMaxVertices = maxQuadVertices; |
| 269 | } |
| 270 | bool success = fDrawTarget->reserveVertexAndIndexSpace( |
| 271 | fVertexLayout, |
| 272 | fMaxVertices, |
| 273 | 0, |
| 274 | GrTCast<void**>(&fVertices), |
| 275 | NULL); |
| 276 | GrAlwaysAssert(success); |
| 277 | } |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 278 | |
| 279 | GrFixed tx = GrIntToFixed(glyph->fAtlasLocation.fX); |
| 280 | GrFixed ty = GrIntToFixed(glyph->fAtlasLocation.fY); |
| 281 | |
bsalomon@google.com | 2717d56 | 2012-05-07 19:10:52 +0000 | [diff] [blame] | 282 | #if GR_TEXT_SCALAR_IS_USHORT |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 283 | int x = vx >> 16; |
| 284 | int y = vy >> 16; |
| 285 | int w = width >> 16; |
| 286 | int h = height >> 16; |
| 287 | |
| 288 | setRectFan(&fVertices[2*fCurrVertex], x, y, x + w, y + h, 2); |
| 289 | setRectFan(&fVertices[2*fCurrVertex+1], |
| 290 | texture->normalizeFixedX(tx), |
| 291 | texture->normalizeFixedY(ty), |
| 292 | texture->normalizeFixedX(tx + width), |
| 293 | texture->normalizeFixedY(ty + height), |
| 294 | 2); |
| 295 | #else |
| 296 | fVertices[2*fCurrVertex].setXRectFan(vx, vy, vx + width, vy + height, |
| 297 | 2 * sizeof(GrGpuTextVertex)); |
| 298 | fVertices[2*fCurrVertex+1].setXRectFan(texture->normalizeFixedX(tx), |
| 299 | texture->normalizeFixedY(ty), |
| 300 | texture->normalizeFixedX(tx + width), |
| 301 | texture->normalizeFixedY(ty + height), |
| 302 | 2 * sizeof(GrGpuTextVertex)); |
| 303 | #endif |
| 304 | fCurrVertex += 4; |
| 305 | } |
tomhudson@google.com | 375ff85 | 2012-06-29 18:37:57 +0000 | [diff] [blame] | 306 | |