OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "GrStencilAndCoverTextContext.h" | 8 #include "GrStencilAndCoverTextContext.h" |
9 #include "GrBitmapTextContext.h" | 9 #include "GrBitmapTextContext.h" |
10 #include "GrDrawTarget.h" | 10 #include "GrDrawTarget.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 GrStencilAndCoverTextContext* textContext = SkNEW_ARGS(GrStencilAndCoverText
Context, | 33 GrStencilAndCoverTextContext* textContext = SkNEW_ARGS(GrStencilAndCoverText
Context, |
34 (context, props)); | 34 (context, props)); |
35 textContext->fFallbackTextContext = GrBitmapTextContext::Create(context, pro
ps); | 35 textContext->fFallbackTextContext = GrBitmapTextContext::Create(context, pro
ps); |
36 | 36 |
37 return textContext; | 37 return textContext; |
38 } | 38 } |
39 | 39 |
40 GrStencilAndCoverTextContext::~GrStencilAndCoverTextContext() { | 40 GrStencilAndCoverTextContext::~GrStencilAndCoverTextContext() { |
41 } | 41 } |
42 | 42 |
43 bool GrStencilAndCoverTextContext::canDraw(const SkPaint& paint, const SkMatrix&
viewMatrix) { | 43 bool GrStencilAndCoverTextContext::canDraw(const GrRenderTarget* rt, const SkPai
nt& paint, |
| 44 const SkMatrix& viewMatrix) { |
44 if (paint.getRasterizer()) { | 45 if (paint.getRasterizer()) { |
45 return false; | 46 return false; |
46 } | 47 } |
47 if (paint.getMaskFilter()) { | 48 if (paint.getMaskFilter()) { |
48 return false; | 49 return false; |
49 } | 50 } |
50 if (paint.getPathEffect()) { | 51 if (paint.getPathEffect()) { |
51 return false; | 52 return false; |
52 } | 53 } |
53 | 54 |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 | 464 |
464 SkGlyphCache::AttachCache(fGlyphCache); | 465 SkGlyphCache::AttachCache(fGlyphCache); |
465 fGlyphCache = NULL; | 466 fGlyphCache = NULL; |
466 | 467 |
467 fPipelineBuilder.stencil()->setDisabled(); | 468 fPipelineBuilder.stencil()->setDisabled(); |
468 fStateRestore.set(NULL); | 469 fStateRestore.set(NULL); |
469 fViewMatrix = fContextInitialMatrix; | 470 fViewMatrix = fContextInitialMatrix; |
470 GrTextContext::finish(); | 471 GrTextContext::finish(); |
471 } | 472 } |
472 | 473 |
OLD | NEW |