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

Unified Diff: src/gpu/GrDrawContext.cpp

Issue 1336413006: Just an experiment (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+}
« no previous file with comments | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698