Index: src/gpu/GrDrawTarget.cpp |
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp |
index fb4c9a1509a4ffffce549d8fe3116c88f373b10e..35025420793c8e96d7449dfae6d6c78175f1680e 100644 |
--- a/src/gpu/GrDrawTarget.cpp |
+++ b/src/gpu/GrDrawTarget.cpp |
@@ -548,6 +548,36 @@ void GrDrawTarget::drawPath(const GrPath* path, SkPath::FillType fill) { |
this->onDrawPath(path, fill, dstCopy.texture() ? &dstCopy : NULL); |
} |
+void GrDrawTarget::drawPaths(size_t pathCount, const GrPath** paths, |
+ const SkMatrix* transforms, |
+ SkPath::FillType fill, SkStrokeRec::Style stroke) { |
+ SkASSERT(pathCount > 0); |
+ SkASSERT(NULL != paths); |
+ SkASSERT(NULL != paths[0]); |
+ SkASSERT(this->caps()->pathRenderingSupport()); |
+ SkASSERT(!SkPath::IsInverseFillType(fill)); |
+ |
+ const GrDrawState* drawState = &getDrawState(); |
+ |
+ SkRect devBounds; |
+ for (size_t i = 0; i < pathCount; ++i) { |
+ SkRect mappedPathBounds; |
+ transforms[i].mapRect(&mappedPathBounds, paths[i]->getBounds()); |
+ devBounds.join(mappedPathBounds); |
+ } |
+ |
+ SkMatrix viewM = drawState->getViewMatrix(); |
+ viewM.mapRect(&devBounds); |
+ |
+ GrDeviceCoordTexture dstCopy; |
+ if (!this->setupDstReadIfNecessary(&dstCopy, &devBounds)) { |
+ return; |
+ } |
+ |
+ this->onDrawPaths(pathCount, paths, transforms, fill, stroke, |
+ dstCopy.texture() ? &dstCopy : NULL); |
+} |
+ |
void GrDrawTarget::instantGpuTraceEvent(const char* marker) { |
if (this->caps()->gpuTracingSupport()) { |
this->onInstantGpuTraceEvent(marker); |