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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 * the provided target. | 190 * the provided target. |
191 * Due to its expense, the software path renderer has split out so it can | 191 * Due to its expense, the software path renderer has split out so it can |
192 * can be individually allowed/disallowed via the "allowSW" boolean. | 192 * can be individually allowed/disallowed via the "allowSW" boolean. |
193 */ | 193 */ |
194 GrPathRenderer* GrDrawingManager::getPathRenderer(const GrPathRenderer::CanDrawP
athArgs& args, | 194 GrPathRenderer* GrDrawingManager::getPathRenderer(const GrPathRenderer::CanDrawP
athArgs& args, |
195 bool allowSW, | 195 bool allowSW, |
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); | 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 = new GrSoftwarePathRenderer(fContext->texture
Provider()); |
207 } | 207 } |
208 pr = fSoftwarePathRenderer; | 208 pr = fSoftwarePathRenderer; |
209 } | 209 } |
210 | 210 |
(...skipping 28 matching lines...) Expand all Loading... |
239 std::move(colorSpace), s
urfaceProps, | 239 std::move(colorSpace), s
urfaceProps, |
240 fContext->getAuditTrail(
), fSingleOwner)); | 240 fContext->getAuditTrail(
), fSingleOwner)); |
241 } | 241 } |
242 } | 242 } |
243 | 243 |
244 return sk_sp<GrDrawContext>(new GrDrawContext(fContext, this, std::move(rt), | 244 return sk_sp<GrDrawContext>(new GrDrawContext(fContext, this, std::move(rt), |
245 std::move(colorSpace), surface
Props, | 245 std::move(colorSpace), surface
Props, |
246 fContext->getAuditTrail(), | 246 fContext->getAuditTrail(), |
247 fSingleOwner)); | 247 fSingleOwner)); |
248 } | 248 } |
OLD | NEW |