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

Unified Diff: src/gpu/batches/GrDrawBatch.h

Issue 1293563003: Put clear and discard into GrBatch. (Closed) Base URL: https://skia.googlesource.com/skia.git@protectedprepare
Patch Set: tiny Created 5 years, 4 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 | « src/gpu/batches/GrDiscardBatch.h ('k') | src/gpu/batches/GrVertexBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrDrawBatch.h
diff --git a/src/gpu/batches/GrDrawBatch.h b/src/gpu/batches/GrDrawBatch.h
index bbebe5b98cfeda0392abe93e8457176742b755a6..ed33816603e7eefbc35d0096d0eee9f94e6e233f 100644
--- a/src/gpu/batches/GrDrawBatch.h
+++ b/src/gpu/batches/GrDrawBatch.h
@@ -56,6 +56,25 @@ public:
// TODO no GrPrimitiveProcessors yet read fragment position
bool willReadFragmentPosition() const { return false; }
+ uint32_t renderTargetUniqueID() const final {
+ SkASSERT(fPipelineInstalled);
+ return this->pipeline()->getRenderTarget()->getUniqueID();
+ }
+
+ SkString dumpInfo() const override {
+ SkString string;
+ string.append("ColorStages:\n");
+ for (int i = 0; i < this->pipeline()->numColorFragmentStages(); i++) {
+ string.appendf("\t\t%s\n", this->pipeline()->getColorStage(i).processor()->name());
+ }
+ string.append("CoverageStages:\n");
+ for (int i = 0; i < this->pipeline()->numCoverageFragmentStages(); i++) {
+ string.appendf("\t%s\n", this->pipeline()->getCoverageStage(i).processor()->name());
+ }
+ string.appendf("XP: %s\n", this->pipeline()->getXferProcessor()->name());
+ return string;
+ }
+
private:
/**
* initBatchTracker is a hook for the some additional overrides / optimization possibilities
« no previous file with comments | « src/gpu/batches/GrDiscardBatch.h ('k') | src/gpu/batches/GrVertexBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698