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

Unified Diff: src/gpu/GrPipelineBuilder.h

Issue 912413002: Pass in ProcOptInfos into willNeedDstCopy on XPs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Review cleanup Created 5 years, 10 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/GrPipeline.cpp ('k') | src/gpu/GrPipelineBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPipelineBuilder.h
diff --git a/src/gpu/GrPipelineBuilder.h b/src/gpu/GrPipelineBuilder.h
index 5743c39dc59c2c3609d435b24f517d4a06b00fa7..8f0657f159f8f13010a15fa1ccc49c5d76209e13 100644
--- a/src/gpu/GrPipelineBuilder.h
+++ b/src/gpu/GrPipelineBuilder.h
@@ -104,7 +104,8 @@ public:
/**
* Checks whether the xp will need a copy of the destination to correctly blend.
*/
- bool willXPNeedDstCopy(const GrDrawTargetCaps& caps) const;
+ bool willXPNeedDstCopy(const GrDrawTargetCaps& caps, const GrProcOptInfo& colorPOI,
+ const GrProcOptInfo& coveragePOI) const;
/**
* The xfer processor factory.
@@ -389,15 +390,6 @@ public:
GrPipelineBuilder& operator= (const GrPipelineBuilder& that);
-private:
- // Calculating invariant color / coverage information is expensive, so we partially cache the
- // results.
- //
- // canUseFracCoveragePrimProc() - Called in regular skia draw, caches results but only for a
- // specific color and coverage. May be called multiple times
- // willBlendWithDst() - only called by Nvpr, does not cache results
- // GrOptDrawState constructor - never caches results
-
// TODO delete when we have Batch
const GrProcOptInfo& colorProcInfo(const GrPrimitiveProcessor* pp) const {
this->calcColorInvariantOutput(pp);
@@ -418,6 +410,14 @@ private:
this->calcCoverageInvariantOutput(batch);
return fCoverageProcInfo;
}
+private:
+ // Calculating invariant color / coverage information is expensive, so we partially cache the
+ // results.
+ //
+ // canUseFracCoveragePrimProc() - Called in regular skia draw, caches results but only for a
+ // specific color and coverage. May be called multiple times
+ // willBlendWithDst() - only called by Nvpr, does not cache results
+ // GrOptDrawState constructor - never caches results
/**
* Primproc variants of the calc functions
« no previous file with comments | « src/gpu/GrPipeline.cpp ('k') | src/gpu/GrPipelineBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698