Index: src/gpu/GrDrawContext.cpp |
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp |
index 1969bd03be29063f62139f16bb4e246aad63ba9e..98404a29d124577c6dbbc879404fe4572427f258 100644 |
--- a/src/gpu/GrDrawContext.cpp |
+++ b/src/gpu/GrDrawContext.cpp |
@@ -21,6 +21,8 @@ |
#include "batches/GrDrawVerticesBatch.h" |
#include "batches/GrRectBatchFactory.h" |
+#include "draws/GrDraw.h" |
+ |
#define ASSERT_OWNED_RESOURCE(R) SkASSERT(!(R) || (R)->getContext() == fContext) |
#define RETURN_IF_ABANDONED if (!fDrawTarget) { return; } |
#define RETURN_FALSE_IF_ABANDONED if (!fDrawTarget) { return false; } |
@@ -279,7 +281,7 @@ void GrDrawContext::drawRect(GrRenderTarget* rt, |
} else { |
SkRect devBoundRect; |
viewMatrix.mapRect(&devBoundRect, rect); |
- batch.reset(GrRectBatchFactory::CreateAAFill(color, viewMatrix, rect, devBoundRect)); |
+ batch.reset(GrRectBatchFactory::CreateAAFill(color, viewMatrix, rect)); |
} |
fDrawTarget->drawBatch(pipelineBuilder, batch); |
return; |
@@ -762,3 +764,9 @@ bool GrDrawContext::prepareToDraw(GrRenderTarget* rt) { |
void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* batch) { |
fDrawTarget->drawBatch(*pipelineBuilder, batch); |
} |
+ |
+void GrDrawContext::draw(const GrDraw& draw) { |
+ RETURN_IF_ABANDONED |
+ |
+ draw.execute(fDrawTarget); |
+} |