aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrProcessorSet.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-03-16 19:51:42 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-16 19:51:55 +0000
commitc48af934608bbb65650641f66adb51f2102d4274 (patch)
tree7853ab4fc62a179b8192a5c25db3472dd5fe6b9a /src/gpu/GrProcessorSet.h
parenta839fc0b63bd68682dcf51abc77078bfea48c1a1 (diff)
Revert "Remove GrPipeline from GrDrawOp."
This reverts commit 2bf4b3a97b770811d9e0558dbbfbdb57cfafbdb7. Reason for revert: nanobench assertion Original change's description: > Remove GrPipeline from GrDrawOp. > > GrDrawOp subclasses are now free to construct their pipelines at flush time and now in theory could use multiple GrPipelines for multipass rendering. > > GrProcessorSet may be used to retain the processors from a GrPaint with "pending execution" style refs. > > NVPR and Instanced rendering are updated to create their pipelines at flush time without a GrPipelineBuilder. > > The monolithic pipeline creation/management that was on GrDrawOp is moved to GrMeshDrawOp. However, this is temporary and will be removed in coming changes. > > Change-Id: I124282e3cea5d070970b5460c8a679fcaf7a8eff > Reviewed-on: https://skia-review.googlesource.com/7279 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1bc64f6cbbd5f482417637a034342c2b5371dc5c Reviewed-on: https://skia-review.googlesource.com/9817 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrProcessorSet.h')
-rw-r--r--src/gpu/GrProcessorSet.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/gpu/GrProcessorSet.h b/src/gpu/GrProcessorSet.h
index 18a52fd9b7..8203491435 100644
--- a/src/gpu/GrProcessorSet.h
+++ b/src/gpu/GrProcessorSet.h
@@ -20,15 +20,13 @@ class GrProcessorSet : private SkNoncopyable {
public:
GrProcessorSet(GrPaint&& paint);
- ~GrProcessorSet();
-
- /**
- * If an op is recorded with this processor set then this must be called to ensure pending
- * reads and writes are propagated to resources referred to by the processors. Otherwise,
- * data hazards may occur.
- */
- void makePendingExecution();
- bool isPendingExecution() const { return SkToBool(kPendingExecution_Flag & fFlags); }
+ ~GrProcessorSet() {
+ // We are deliberately not using sk_sp here because this will be updated to work with
+ // "pending execution" refs.
+ for (auto fp : fFragmentProcessors) {
+ fp->unref();
+ }
+ }
int numColorFragmentProcessors() const { return fColorFragmentProcessorCnt; }
int numCoverageFragmentProcessors() const {
@@ -52,9 +50,6 @@ public:
}
bool allowSRGBInputs() const { return SkToBool(fFlags & kAllowSRGBInputs_Flag); }
- bool operator==(const GrProcessorSet& that) const;
- bool operator!=(const GrProcessorSet& that) const { return !(*this == that); }
-
/**
* This is used to track analysis of color and coverage values through the fragment processors.
*/
@@ -161,8 +156,7 @@ private:
enum Flags : uint16_t {
kUseDistanceVectorField_Flag = 0x1,
kDisableOutputConversionToSRGB_Flag = 0x2,
- kAllowSRGBInputs_Flag = 0x4,
- kPendingExecution_Flag = 0x8
+ kAllowSRGBInputs_Flag = 0x4
};
const GrXPFactory* fXPFactory = nullptr;