OLD | NEW |
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 "GrBitmapTextContext.h" | 8 #include "GrBitmapTextContext.h" |
9 #include "GrAtlas.h" | 9 #include "GrAtlas.h" |
10 #include "GrDefaultGeoProcFactory.h" | 10 #include "GrDefaultGeoProcFactory.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 fTotalVertexCount = 0; | 59 fTotalVertexCount = 0; |
60 | 60 |
61 fVertexBounds.setLargestInverted(); | 61 fVertexBounds.setLargestInverted(); |
62 } | 62 } |
63 | 63 |
64 GrBitmapTextContext* GrBitmapTextContext::Create(GrContext* context, | 64 GrBitmapTextContext* GrBitmapTextContext::Create(GrContext* context, |
65 const SkDeviceProperties& props
) { | 65 const SkDeviceProperties& props
) { |
66 return SkNEW_ARGS(GrBitmapTextContext, (context, props)); | 66 return SkNEW_ARGS(GrBitmapTextContext, (context, props)); |
67 } | 67 } |
68 | 68 |
69 bool GrBitmapTextContext::canDraw(const SkPaint& paint, const SkMatrix& viewMatr
ix) { | 69 bool GrBitmapTextContext::canDraw(const GrRenderTarget* rt, const SkPaint& paint
, |
| 70 const SkMatrix& viewMatrix) { |
70 return !SkDraw::ShouldDrawTextAsPaths(paint, viewMatrix); | 71 return !SkDraw::ShouldDrawTextAsPaths(paint, viewMatrix); |
71 } | 72 } |
72 | 73 |
73 inline void GrBitmapTextContext::init(GrRenderTarget* rt, const GrClip& clip, | 74 inline void GrBitmapTextContext::init(GrRenderTarget* rt, const GrClip& clip, |
74 const GrPaint& paint, const SkPaint& skPai
nt) { | 75 const GrPaint& paint, const SkPaint& skPai
nt) { |
75 GrTextContext::init(rt, clip, paint, skPaint); | 76 GrTextContext::init(rt, clip, paint, skPaint); |
76 | 77 |
77 fStrike = NULL; | 78 fStrike = NULL; |
78 | 79 |
79 fCurrTexture = NULL; | 80 fCurrTexture = NULL; |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 } | 621 } |
621 } | 622 } |
622 | 623 |
623 inline void GrBitmapTextContext::finish() { | 624 inline void GrBitmapTextContext::finish() { |
624 this->flush(); | 625 this->flush(); |
625 fTotalVertexCount = 0; | 626 fTotalVertexCount = 0; |
626 | 627 |
627 GrTextContext::finish(); | 628 GrTextContext::finish(); |
628 } | 629 } |
629 | 630 |
OLD | NEW |