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 #include "GrTextContext.h" | 9 #include "GrTextContext.h" |
10 | 10 |
11 GrTextContext::GrTextContext(GrContext* context, const GrPaint& paint) : fPaint(
paint) { | 11 GrTextContext::GrTextContext(GrContext* context, const GrPaint& paint, |
| 12 const SkPaint& skPaint) : fPaint(paint), fSkPaint(s
kPaint) { |
12 fContext = context; | 13 fContext = context; |
13 | 14 |
14 const GrClipData* clipData = context->getClip(); | 15 const GrClipData* clipData = context->getClip(); |
15 | 16 |
16 SkRect devConservativeBound; | 17 SkRect devConservativeBound; |
17 clipData->fClipStack->getConservativeBounds( | 18 clipData->fClipStack->getConservativeBounds( |
18 -clipData->fOrigin.fX, | 19 -clipData->fOrigin.fX, |
19 -clipData->fOrigin.fY, | 20 -clipData->fOrigin.fY, |
20 context->getRenderTarget()->width(), | 21 context->getRenderTarget()->width(), |
21 context->getRenderTarget()->height(), | 22 context->getRenderTarget()->height(), |
22 &devConservativeBound); | 23 &devConservativeBound); |
23 | 24 |
24 devConservativeBound.roundOut(&fClipRect); | 25 devConservativeBound.roundOut(&fClipRect); |
25 | 26 |
26 fDrawTarget = fContext->getTextTarget(); | 27 fDrawTarget = fContext->getTextTarget(); |
27 } | 28 } |
OLD | NEW |