| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "GrDrawContext.h" | 8 #include "GrDrawContext.h" |
| 9 #include "GrDrawingManager.h" | 9 #include "GrDrawingManager.h" |
| 10 #include "GrDrawTarget.h" | 10 #include "GrDrawTarget.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 GrPathRendererChain::DrawType
drawType, | 144 GrPathRendererChain::DrawType
drawType, |
| 145 GrPathRenderer::StencilSupport
* stencilSupport) { | 145 GrPathRenderer::StencilSupport
* stencilSupport) { |
| 146 | 146 |
| 147 if (!fPathRendererChain) { | 147 if (!fPathRendererChain) { |
| 148 fPathRendererChain = new GrPathRendererChain(fContext); | 148 fPathRendererChain = new GrPathRendererChain(fContext); |
| 149 } | 149 } |
| 150 | 150 |
| 151 GrPathRenderer* pr = fPathRendererChain->getPathRenderer(args, drawType, ste
ncilSupport); | 151 GrPathRenderer* pr = fPathRendererChain->getPathRenderer(args, drawType, ste
ncilSupport); |
| 152 if (!pr && allowSW) { | 152 if (!pr && allowSW) { |
| 153 if (!fSoftwarePathRenderer) { | 153 if (!fSoftwarePathRenderer) { |
| 154 fSoftwarePathRenderer = new GrSoftwarePathRenderer(fContext); | 154 fSoftwarePathRenderer = new GrSoftwarePathRenderer(fContext->texture
Provider()); |
| 155 } | 155 } |
| 156 pr = fSoftwarePathRenderer; | 156 pr = fSoftwarePathRenderer; |
| 157 } | 157 } |
| 158 | 158 |
| 159 return pr; | 159 return pr; |
| 160 } | 160 } |
| 161 | 161 |
| 162 sk_sp<GrDrawContext> GrDrawingManager::drawContext(sk_sp<GrRenderTarget> rt, | 162 sk_sp<GrDrawContext> GrDrawingManager::drawContext(sk_sp<GrRenderTarget> rt, |
| 163 const SkSurfaceProps* surface
Props) { | 163 const SkSurfaceProps* surface
Props) { |
| 164 if (this->wasAbandoned()) { | 164 if (this->wasAbandoned()) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 179 fContext, this, std::mov
e(rt), | 179 fContext, this, std::mov
e(rt), |
| 180 surfaceProps, | 180 surfaceProps, |
| 181 fContext->getAuditTrail(
), fSingleOwner)); | 181 fContext->getAuditTrail(
), fSingleOwner)); |
| 182 } | 182 } |
| 183 } | 183 } |
| 184 | 184 |
| 185 return sk_sp<GrDrawContext>(new GrDrawContext(fContext, this, std::move(rt),
surfaceProps, | 185 return sk_sp<GrDrawContext>(new GrDrawContext(fContext, this, std::move(rt),
surfaceProps, |
| 186 fContext->getAuditTrail(), | 186 fContext->getAuditTrail(), |
| 187 fSingleOwner)); | 187 fSingleOwner)); |
| 188 } | 188 } |
| OLD | NEW |