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

Unified Diff: src/gpu/batches/GrDrawPathBatch.cpp

Issue 1506823004: Remove drawPathsFromRange from GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: formatting Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/batches/GrDrawPathBatch.h ('k') | src/gpu/batches/GrStencilAndCoverPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrDrawPathBatch.cpp
diff --git a/src/gpu/batches/GrDrawPathBatch.cpp b/src/gpu/batches/GrDrawPathBatch.cpp
index 5209f907de29bedd1f1d6a40b5499a1c7c795463..c2007ce933b7399cf4e9ab55307d7615e87da0cd 100644
--- a/src/gpu/batches/GrDrawPathBatch.cpp
+++ b/src/gpu/batches/GrDrawPathBatch.cpp
@@ -42,23 +42,11 @@ SkString GrDrawPathRangeBatch::dumpInfo() const {
return string;
}
-bool GrDrawPathRangeBatch::isWinding() const {
- static const GrStencilSettings::Face pathFace = GrStencilSettings::kFront_Face;
- bool isWinding = kInvert_StencilOp != this->stencilSettings().passOp(pathFace);
- if (isWinding) {
- // Double check that it is in fact winding.
- SkASSERT(kIncClamp_StencilOp == this->stencilSettings().passOp(pathFace));
- SkASSERT(kIncClamp_StencilOp == this->stencilSettings().failOp(pathFace));
- SkASSERT(0x1 != this->stencilSettings().writeMask(pathFace));
- SkASSERT(!this->stencilSettings().isTwoSided());
- }
- return isWinding;
-}
-
GrDrawPathRangeBatch::GrDrawPathRangeBatch(const SkMatrix& viewMatrix, const SkMatrix& localMatrix,
- GrColor color, GrPathRange* range, GrPathRangeDraw* draw,
+ GrColor color, GrPathRendering::FillType fill,
+ GrPathRange* range, GrPathRangeDraw* draw,
const SkRect& bounds)
- : INHERITED(ClassID(), viewMatrix, color)
+ : INHERITED(ClassID(), viewMatrix, color, fill)
, fPathRange(range)
, fLocalMatrix(localMatrix) {
SkDEBUGCODE(draw->fUsedInBatch = true;)
@@ -90,7 +78,7 @@ bool GrDrawPathRangeBatch::onCombineIfPossible(GrBatch* t, const GrCaps& caps) {
// work). Note that it's also possible for overlapping paths to cancel each other's winding
// numbers, and we only partially account for this by not allowing even/odd paths to be
// combined. (Glyphs in the same font tend to wind the same direction so it works out OK.)
- if (!this->isWinding() ||
+ if (GrPathRendering::kWinding_FillType != this->fillType() ||
this->stencilSettings() != that->stencilSettings() ||
this->overrides().willColorBlendWithDst()) {
return false;
« no previous file with comments | « src/gpu/batches/GrDrawPathBatch.h ('k') | src/gpu/batches/GrStencilAndCoverPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698