OLD | NEW |
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" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 GrTextContext::GrTextContext(GrContext* context, const GrPaint& paint) : fPaint(
paint) { | 74 GrTextContext::GrTextContext(GrContext* context, const GrPaint& paint) : fPaint(
paint) { |
75 fContext = context; | 75 fContext = context; |
76 fStrike = NULL; | 76 fStrike = NULL; |
77 | 77 |
78 fCurrTexture = NULL; | 78 fCurrTexture = NULL; |
79 fCurrVertex = 0; | 79 fCurrVertex = 0; |
80 | 80 |
81 const GrClipData* clipData = context->getClip(); | 81 const GrClipData* clipData = context->getClip(); |
82 | 82 |
83 GrRect devConservativeBound; | 83 SkRect devConservativeBound; |
84 clipData->fClipStack->getConservativeBounds( | 84 clipData->fClipStack->getConservativeBounds( |
85 -clipData->fOrigin.fX, | 85 -clipData->fOrigin.fX, |
86 -clipData->fOrigin.fY, | 86 -clipData->fOrigin.fY, |
87 context->getRenderTarget()->width(), | 87 context->getRenderTarget()->width(), |
88 context->getRenderTarget()->height(), | 88 context->getRenderTarget()->height(), |
89 &devConservativeBound); | 89 &devConservativeBound); |
90 | 90 |
91 devConservativeBound.roundOut(&fClipRect); | 91 devConservativeBound.roundOut(&fClipRect); |
92 | 92 |
93 fAutoMatrix.setIdentity(fContext, &fPaint); | 93 fAutoMatrix.setIdentity(fContext, &fPaint); |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 SkFixedToFloat(vx + width), | 240 SkFixedToFloat(vx + width), |
241 SkFixedToFloat(vy + height), | 241 SkFixedToFloat(vy + height), |
242 2 * sizeof(SkPoint)); | 242 2 * sizeof(SkPoint)); |
243 fVertices[2*fCurrVertex+1].setRectFan(SkFixedToFloat(texture->normalizeFixed
X(tx)), | 243 fVertices[2*fCurrVertex+1].setRectFan(SkFixedToFloat(texture->normalizeFixed
X(tx)), |
244 SkFixedToFloat(texture->normalizeFixed
Y(ty)), | 244 SkFixedToFloat(texture->normalizeFixed
Y(ty)), |
245 SkFixedToFloat(texture->normalizeFixed
X(tx + width)), | 245 SkFixedToFloat(texture->normalizeFixed
X(tx + width)), |
246 SkFixedToFloat(texture->normalizeFixed
Y(ty + height)), | 246 SkFixedToFloat(texture->normalizeFixed
Y(ty + height)), |
247 2 * sizeof(SkPoint)); | 247 2 * sizeof(SkPoint)); |
248 fCurrVertex += 4; | 248 fCurrVertex += 4; |
249 } | 249 } |
OLD | NEW |