| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "GrAtlasTextContext.h" | 9 #include "GrAtlasTextContext.h" |
| 10 #include "GrBatchTest.h" | 10 #include "GrBatchTest.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 } | 56 } |
| 57 | 57 |
| 58 fDrawTarget->copySurface(dst, src, srcRect, dstPoint); | 58 fDrawTarget->copySurface(dst, src, srcRect, dstPoint); |
| 59 } | 59 } |
| 60 | 60 |
| 61 GrTextContext* GrDrawContext::createTextContext(GrRenderTarget* renderTarget, | 61 GrTextContext* GrDrawContext::createTextContext(GrRenderTarget* renderTarget, |
| 62 const SkSurfaceProps& surfacePro
ps) { | 62 const SkSurfaceProps& surfacePro
ps) { |
| 63 if (fContext->caps()->shaderCaps()->pathRenderingSupport() && | 63 if (fContext->caps()->shaderCaps()->pathRenderingSupport() && |
| 64 renderTarget->isStencilBufferMultisampled() && | 64 renderTarget->isStencilBufferMultisampled() && |
| 65 fSurfaceProps.isUseDeviceIndependentFonts()) { | 65 fSurfaceProps.isUseDeviceIndependentFonts()) { |
| 66 GrStencilAttachment* sb = renderTarget->renderTargetPriv().attachStencil
Attachment(); | 66 GrStencilAttachment* sb = |
| 67 fContext->resourceProvider()->attachStencilAttachment(renderTarget); |
| 67 if (sb) { | 68 if (sb) { |
| 68 return GrStencilAndCoverTextContext::Create(fContext, surfaceProps); | 69 return GrStencilAndCoverTextContext::Create(fContext, surfaceProps); |
| 69 } | 70 } |
| 70 } | 71 } |
| 71 | 72 |
| 72 return GrAtlasTextContext::Create(fContext, surfaceProps); | 73 return GrAtlasTextContext::Create(fContext, surfaceProps); |
| 73 } | 74 } |
| 74 | 75 |
| 75 void GrDrawContext::drawText(GrRenderTarget* rt, const GrClip& clip, const GrPai
nt& grPaint, | 76 void GrDrawContext::drawText(GrRenderTarget* rt, const GrClip& clip, const GrPai
nt& grPaint, |
| 76 const SkPaint& skPaint, | 77 const SkPaint& skPaint, |
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 RETURN_FALSE_IF_ABANDONED | 756 RETURN_FALSE_IF_ABANDONED |
| 756 | 757 |
| 757 ASSERT_OWNED_RESOURCE(rt); | 758 ASSERT_OWNED_RESOURCE(rt); |
| 758 SkASSERT(rt); | 759 SkASSERT(rt); |
| 759 return true; | 760 return true; |
| 760 } | 761 } |
| 761 | 762 |
| 762 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b
atch) { | 763 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b
atch) { |
| 763 fDrawTarget->drawBatch(*pipelineBuilder, batch); | 764 fDrawTarget->drawBatch(*pipelineBuilder, batch); |
| 764 } | 765 } |
| OLD | NEW |