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

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

Issue 715903002: Push creation of default GP to the caller (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: added comment Created 6 years, 1 month 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/GrDefaultGeoProcFactory.cpp ('k') | src/gpu/GrDrawTarget.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 2011 Google Inc. 2 * Copyright 2011 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 "GrDefaultPathRenderer.h" 8 #include "GrDefaultPathRenderer.h"
9 9
10 #include "GrContext.h" 10 #include "GrContext.h"
11 #include "GrDefaultGeoProcFactory.h"
11 #include "GrDrawState.h" 12 #include "GrDrawState.h"
12 #include "GrPathUtils.h" 13 #include "GrPathUtils.h"
13 #include "SkString.h" 14 #include "SkString.h"
14 #include "SkStrokeRec.h" 15 #include "SkStrokeRec.h"
15 #include "SkTLazy.h" 16 #include "SkTLazy.h"
16 #include "SkTraceEvent.h" 17 #include "SkTraceEvent.h"
17 18
18 19
19 GrDefaultPathRenderer::GrDefaultPathRenderer(bool separateStencilSupport, 20 GrDefaultPathRenderer::GrDefaultPathRenderer(bool separateStencilSupport,
20 bool stencilWrapOpsSupport) 21 bool stencilWrapOpsSupport)
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 } 490 }
490 } else { 491 } else {
491 bounds = path.getBounds(); 492 bounds = path.getBounds();
492 } 493 }
493 GrDrawTarget::AutoGeometryAndStatePush agasp(target, GrDrawTarget::k Preserve_ASRInit); 494 GrDrawTarget::AutoGeometryAndStatePush agasp(target, GrDrawTarget::k Preserve_ASRInit);
494 target->drawSimpleRect(bounds); 495 target->drawSimpleRect(bounds);
495 } else { 496 } else {
496 if (passCount > 1) { 497 if (passCount > 1) {
497 drawState->enableState(GrDrawState::kNoColorWrites_StateBit); 498 drawState->enableState(GrDrawState::kNoColorWrites_StateBit);
498 } 499 }
500 GrDrawState::AutoRestoreEffects are(drawState);
501 drawState->setGeometryProcessor(GrDefaultGeoProcFactory::Create(fals e))->unref();
499 if (indexCnt) { 502 if (indexCnt) {
500 target->drawIndexed(primType, 0, 0, 503 target->drawIndexed(primType, 0, 0,
501 vertexCnt, indexCnt, &devBounds); 504 vertexCnt, indexCnt, &devBounds);
502 } else { 505 } else {
503 target->drawNonIndexed(primType, 0, vertexCnt, &devBounds); 506 target->drawNonIndexed(primType, 0, vertexCnt, &devBounds);
504 } 507 }
505 } 508 }
506 } 509 }
507 return true; 510 return true;
508 } 511 }
(...skipping 19 matching lines...) Expand all
528 false); 531 false);
529 } 532 }
530 533
531 void GrDefaultPathRenderer::onStencilPath(const SkPath& path, 534 void GrDefaultPathRenderer::onStencilPath(const SkPath& path,
532 const SkStrokeRec& stroke, 535 const SkStrokeRec& stroke,
533 GrDrawTarget* target) { 536 GrDrawTarget* target) {
534 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType()); 537 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType());
535 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType()); 538 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType());
536 this->internalDrawPath(path, stroke, target, true); 539 this->internalDrawPath(path, stroke, target, true);
537 } 540 }
OLDNEW
« no previous file with comments | « src/gpu/GrDefaultGeoProcFactory.cpp ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698