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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 fVertexBounds.setLargestInverted(); | 62 fVertexBounds.setLargestInverted(); |
63 } | 63 } |
64 | 64 |
65 GrBitmapTextContext* GrBitmapTextContext::Create(GrContext* context, | 65 GrBitmapTextContext* GrBitmapTextContext::Create(GrContext* context, |
66 SkGpuDevice* gpuDevice, | 66 SkGpuDevice* gpuDevice, |
67 const SkDeviceProperties& props
) { | 67 const SkDeviceProperties& props
) { |
68 return SkNEW_ARGS(GrBitmapTextContext, (context, gpuDevice, props)); | 68 return SkNEW_ARGS(GrBitmapTextContext, (context, gpuDevice, props)); |
69 } | 69 } |
70 | 70 |
71 bool GrBitmapTextContext::canDraw(const SkPaint& paint, const SkMatrix& viewMatr
ix) { | 71 bool GrBitmapTextContext::canDraw(const GrRenderTarget* rt, |
72 return !SkDraw::ShouldDrawTextAsPaths(paint, viewMatrix); | 72 const GrClip& clip, |
| 73 const GrPaint& paint, |
| 74 const SkPaint& skPaint, |
| 75 const SkMatrix& viewMatrix) { |
| 76 return !SkDraw::ShouldDrawTextAsPaths(skPaint, viewMatrix); |
73 } | 77 } |
74 | 78 |
75 inline void GrBitmapTextContext::init(GrRenderTarget* rt, const GrClip& clip, | 79 inline void GrBitmapTextContext::init(GrRenderTarget* rt, const GrClip& clip, |
76 const GrPaint& paint, const SkPaint& skPai
nt, | 80 const GrPaint& paint, const SkPaint& skPai
nt, |
77 const SkIRect& regionClipBounds) { | 81 const SkIRect& regionClipBounds) { |
78 GrTextContext::init(rt, clip, paint, skPaint, regionClipBounds); | 82 GrTextContext::init(rt, clip, paint, skPaint, regionClipBounds); |
79 | 83 |
80 fStrike = NULL; | 84 fStrike = NULL; |
81 | 85 |
82 fCurrTexture = NULL; | 86 fCurrTexture = NULL; |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 } | 632 } |
629 } | 633 } |
630 | 634 |
631 inline void GrBitmapTextContext::finish() { | 635 inline void GrBitmapTextContext::finish() { |
632 this->flush(); | 636 this->flush(); |
633 fTotalVertexCount = 0; | 637 fTotalVertexCount = 0; |
634 | 638 |
635 GrTextContext::finish(); | 639 GrTextContext::finish(); |
636 } | 640 } |
637 | 641 |
OLD | NEW |