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

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

Issue 2241873002: Remove stencil settings param from stencilPath() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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/GrDrawTarget.h ('k') | src/gpu/batches/GrStencilAndCoverPathRenderer.cpp » ('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 2010 Google Inc. 2 * Copyright 2010 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 "GrDrawTarget.h" 8 #include "GrDrawTarget.h"
9 9
10 #include "GrAuditTrail.h" 10 #include "GrAuditTrail.h"
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 SkASSERT(fRenderTarget); 407 SkASSERT(fRenderTarget);
408 batch->pipeline()->addDependenciesTo(fRenderTarget); 408 batch->pipeline()->addDependenciesTo(fRenderTarget);
409 #endif 409 #endif
410 SkRect clippedBounds; 410 SkRect clippedBounds;
411 SkAssertResult(intersect(&clippedBounds, bounds, appliedClip.deviceBounds()) ); 411 SkAssertResult(intersect(&clippedBounds, bounds, appliedClip.deviceBounds()) );
412 this->recordBatch(batch, clippedBounds); 412 this->recordBatch(batch, clippedBounds);
413 } 413 }
414 414
415 void GrDrawTarget::stencilPath(GrDrawContext* drawContext, 415 void GrDrawTarget::stencilPath(GrDrawContext* drawContext,
416 const GrClip& clip, 416 const GrClip& clip,
417 const GrUserStencilSettings* ss,
418 bool useHWAA, 417 bool useHWAA,
419 const SkMatrix& viewMatrix, 418 const SkMatrix& viewMatrix,
420 const GrPath* path) { 419 const GrPath* path) {
421 // TODO: extract portions of checkDraw that are relevant to path stenciling. 420 // TODO: extract portions of checkDraw that are relevant to path stenciling.
422 SkASSERT(path); 421 SkASSERT(path);
423 SkASSERT(this->caps()->shaderCaps()->pathRenderingSupport()); 422 SkASSERT(this->caps()->shaderCaps()->pathRenderingSupport());
424 423
425 // Setup clip 424 // Setup clip
426 GrAppliedClip appliedClip; 425 GrAppliedClip appliedClip;
427 if (!clip.apply(fContext, drawContext, nullptr, useHWAA, SkToBool(ss), &appl iedClip)) { 426 if (!clip.apply(fContext, drawContext, nullptr, useHWAA, true, &appliedClip) ) {
428 return; 427 return;
429 } 428 }
430 // TODO: respect fClipBatchToBounds if we ever start computing bounds here. 429 // TODO: respect fClipBatchToBounds if we ever start computing bounds here.
431 430
432 // Coverage AA does not make sense when rendering to the stencil buffer. The caller should never 431 // Coverage AA does not make sense when rendering to the stencil buffer. The caller should never
433 // attempt this in a situation that would require coverage AA. 432 // attempt this in a situation that would require coverage AA.
434 SkASSERT(!appliedClip.getClipCoverageFragmentProcessor()); 433 SkASSERT(!appliedClip.getClipCoverageFragmentProcessor());
435 434
436 GrStencilAttachment* stencilAttachment = fResourceProvider->attachStencilAtt achment( 435 GrStencilAttachment* stencilAttachment = fResourceProvider->attachStencilAtt achment(
437 drawContext->accessRenderTarget( )); 436 drawContext->accessRenderTarget( ));
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 } 598 }
600 } 599 }
601 600
602 /////////////////////////////////////////////////////////////////////////////// 601 ///////////////////////////////////////////////////////////////////////////////
603 602
604 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend erTarget* rt) { 603 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend erTarget* rt) {
605 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); 604 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt);
606 this->recordBatch(batch, batch->bounds()); 605 this->recordBatch(batch, batch->bounds());
607 batch->unref(); 606 batch->unref();
608 } 607 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/batches/GrStencilAndCoverPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698