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 "GrDrawingManager.h" | 8 #include "GrDrawingManager.h" |
9 | 9 |
10 #include "GrContext.h" | 10 #include "GrContext.h" |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 GrPathRendererChain::DrawType
drawType, | 196 GrPathRendererChain::DrawType
drawType, |
197 GrPathRenderer::StencilSupport
* stencilSupport) { | 197 GrPathRenderer::StencilSupport
* stencilSupport) { |
198 | 198 |
199 if (!fPathRendererChain) { | 199 if (!fPathRendererChain) { |
200 fPathRendererChain = new GrPathRendererChain(fContext, fOptionsForPathRe
ndererChain); | 200 fPathRendererChain = new GrPathRendererChain(fContext, fOptionsForPathRe
ndererChain); |
201 } | 201 } |
202 | 202 |
203 GrPathRenderer* pr = fPathRendererChain->getPathRenderer(args, drawType, ste
ncilSupport); | 203 GrPathRenderer* pr = fPathRendererChain->getPathRenderer(args, drawType, ste
ncilSupport); |
204 if (!pr && allowSW) { | 204 if (!pr && allowSW) { |
205 if (!fSoftwarePathRenderer) { | 205 if (!fSoftwarePathRenderer) { |
206 fSoftwarePathRenderer = new GrSoftwarePathRenderer(fContext->texture
Provider()); | 206 fSoftwarePathRenderer = |
| 207 new GrSoftwarePathRenderer(fContext->textureProvider(), |
| 208 fOptionsForPathRendererChain.fAll
owPathMaskCaching); |
207 } | 209 } |
208 pr = fSoftwarePathRenderer; | 210 pr = fSoftwarePathRenderer; |
209 } | 211 } |
210 | 212 |
211 return pr; | 213 return pr; |
212 } | 214 } |
213 | 215 |
214 sk_sp<GrDrawContext> GrDrawingManager::makeDrawContext(sk_sp<GrRenderTarget> rt, | 216 sk_sp<GrDrawContext> GrDrawingManager::makeDrawContext(sk_sp<GrRenderTarget> rt, |
215 sk_sp<SkColorSpace> color
Space, | 217 sk_sp<SkColorSpace> color
Space, |
216 const SkSurfaceProps* sur
faceProps) { | 218 const SkSurfaceProps* sur
faceProps) { |
(...skipping 22 matching lines...) Expand all Loading... |
239 std::move(colorSpace), s
urfaceProps, | 241 std::move(colorSpace), s
urfaceProps, |
240 fContext->getAuditTrail(
), fSingleOwner)); | 242 fContext->getAuditTrail(
), fSingleOwner)); |
241 } | 243 } |
242 } | 244 } |
243 | 245 |
244 return sk_sp<GrDrawContext>(new GrDrawContext(fContext, this, std::move(rt), | 246 return sk_sp<GrDrawContext>(new GrDrawContext(fContext, this, std::move(rt), |
245 std::move(colorSpace), surface
Props, | 247 std::move(colorSpace), surface
Props, |
246 fContext->getAuditTrail(), | 248 fContext->getAuditTrail(), |
247 fSingleOwner)); | 249 fSingleOwner)); |
248 } | 250 } |
OLD | NEW |