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

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

Issue 1467553002: New API for computing optimization invariants. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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/GrDrawBatch.h ('k') | src/gpu/batches/GrDrawPathBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrDrawBatch.cpp
diff --git a/src/gpu/batches/GrDrawBatch.cpp b/src/gpu/batches/GrDrawBatch.cpp
index 43ef2ec64bb107372794d7d0efa6623e2be9debc..4253923f335dc9c5736824db437111e7d309d1dc 100644
--- a/src/gpu/batches/GrDrawBatch.cpp
+++ b/src/gpu/batches/GrDrawBatch.cpp
@@ -15,13 +15,21 @@ GrDrawBatch::~GrDrawBatch() {
}
}
+void GrDrawBatch::getPipelineOptimizations(GrPipelineOptimizations* opt) const {
+ GrInitInvariantOutput color;
+ GrInitInvariantOutput coverage;
+ this->computePipelineOptimizations(&color, &coverage, &opt->fOverrides);
+ opt->fColorPOI.initUsingInvariantOutput(color);
+ opt->fCoveragePOI.initUsingInvariantOutput(coverage);
+}
+
bool GrDrawBatch::installPipeline(const GrPipeline::CreateArgs& args) {
- GrPipelineOptimizations opts;
+ GrXPOverridesForBatch overrides;
void* location = fPipelineStorage.get();
- if (!GrPipeline::CreateAt(location, args, &opts)) {
+ if (!GrPipeline::CreateAt(location, args, &overrides)) {
return false;
}
- this->initBatchTracker(opts);
+ this->initBatchTracker(overrides);
fPipelineInstalled = true;
return true;
}
« no previous file with comments | « src/gpu/batches/GrDrawBatch.h ('k') | src/gpu/batches/GrDrawPathBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698