aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPipelineBuilder.h
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@google.com>2015-01-28 06:54:30 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-28 06:54:30 -0800
commitc2893c5e3870d7e9a37ca146e7da88fba54977d5 (patch)
tree9efd98166a608e5ae24d35ab0dde1c7cb9b763b3 /src/gpu/GrPipelineBuilder.h
parent8b0a05ae44911f9263be5936457b66a967b8a1fc (diff)
Revert of GrBatchPrototype (patchset #32 id:630001 of https://codereview.chromium.org/845103005/)
Reason for revert: One last try to fix mac perf regression Original issue's description: > GrBatchPrototype > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/d15e4e45374275c045572b304c229237c4a82be4 > > Committed: https://skia.googlesource.com/skia/+/d5a7db4a867c7e6ccf8451a053d987b470099198 TBR=bsalomon@google.com,kkinnunen@nvidia.com,joshualitt@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/877393002
Diffstat (limited to 'src/gpu/GrPipelineBuilder.h')
-rw-r--r--src/gpu/GrPipelineBuilder.h34
1 files changed, 8 insertions, 26 deletions
diff --git a/src/gpu/GrPipelineBuilder.h b/src/gpu/GrPipelineBuilder.h
index df9a1c85ee..9579024d6a 100644
--- a/src/gpu/GrPipelineBuilder.h
+++ b/src/gpu/GrPipelineBuilder.h
@@ -8,7 +8,7 @@
#ifndef GrPipelineBuilder_DEFINED
#define GrPipelineBuilder_DEFINED
-#include "GrBatch.h"
+
#include "GrBlend.h"
#include "GrDrawTargetCaps.h"
#include "GrGeometryProcessor.h"
@@ -391,15 +391,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);
return fColorProcInfo;
@@ -410,28 +401,17 @@ private:
return fCoverageProcInfo;
}
- const GrProcOptInfo& colorProcInfo(const GrBatch* batch) const {
- this->calcColorInvariantOutput(batch);
- return fColorProcInfo;
- }
-
- const GrProcOptInfo& coverageProcInfo(const GrBatch* batch) const {
- this->calcCoverageInvariantOutput(batch);
- return fCoverageProcInfo;
- }
-
/**
- * Primproc variants of the calc functions
- * TODO remove these when batch is everywhere
+ * If fColorProcInfoValid is false, function calculates the invariant output for the color
+ * stages and results are stored in fColorProcInfo.
*/
void calcColorInvariantOutput(const GrPrimitiveProcessor*) const;
- void calcCoverageInvariantOutput(const GrPrimitiveProcessor*) const;
/**
- * GrBatch provides the initial seed for these loops based off of its initial geometry data
+ * If fCoverageProcInfoValid is false, function calculates the invariant output for the coverage
+ * stages and results are stored in fCoverageProcInfo.
*/
- void calcColorInvariantOutput(const GrBatch*) const;
- void calcCoverageInvariantOutput(const GrBatch*) const;
+ void calcCoverageInvariantOutput(const GrPrimitiveProcessor*) const;
/**
* If fColorProcInfoValid is false, function calculates the invariant output for the color
@@ -465,6 +445,8 @@ private:
mutable bool fCoverageProcInfoValid;
mutable GrColor fColorCache;
mutable GrColor fCoverageCache;
+ mutable const GrPrimitiveProcessor* fColorPrimProc;
+ mutable const GrPrimitiveProcessor* fCoveragePrimProc;
friend class GrPipeline;
};