Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: src/gpu/GrDrawingManager.cpp

Issue 2335343008: Add optional sw generated path coverage mask caching (Closed)
Patch Set: Add .fs to literals in new gm Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrPathRendererChain.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrPathRendererChain.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698