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

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

Issue 2339213002: Add GrContextOptions flag to disable distance field path renderer. (Closed)
Patch Set: Add trivial default constructor to satisfy clang 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/GrDrawingManager.h ('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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawingManager.h ('k') | src/gpu/GrPathRendererChain.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698