Index: src/gpu/GrTessellatingPathRenderer.cpp |
diff --git a/src/gpu/GrTessellatingPathRenderer.cpp b/src/gpu/GrTessellatingPathRenderer.cpp |
index 262cce3e3dbe7fc8209a9c2304a6bc783eaf758c..541384914f998970b520a78505e9c76fc2c43494 100644 |
--- a/src/gpu/GrTessellatingPathRenderer.cpp |
+++ b/src/gpu/GrTessellatingPathRenderer.cpp |
@@ -9,6 +9,7 @@ |
#include "GrBatch.h" |
#include "GrBatchTarget.h" |
+#include "GrBatchTest.h" |
#include "GrDefaultGeoProcFactory.h" |
#include "GrPathUtils.h" |
#include "GrVertices.h" |
@@ -1518,3 +1519,21 @@ bool GrTessellatingPathRenderer::onDrawPath(GrDrawTarget* target, |
return true; |
} |
+ |
+/////////////////////////////////////////////////////////////////////////////////////////////////// |
+ |
+#ifdef GR_TEST_UTILS |
+ |
+BATCH_TEST_DEFINE(TesselatingPathRenderer) { |
+ GrColor color = GrRandomColor(random); |
+ SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random); |
robertphillips
2015/05/07 16:59:29
Limit to concave paths ?
|
+ SkPath path = GrTest::TestPath(random); |
+ SkRect clipBounds = GrTest::TestRect(random); |
+ SkMatrix vmi; |
+ SkDEBUGCODE(bool result = )viewMatrix.invert(&vmi); |
+ SkASSERT(result); |
+ vmi.mapRect(&clipBounds); |
+ return TessellatingPathBatch::Create(color, path, viewMatrix, clipBounds); |
+} |
+ |
+#endif |