aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrProcessorSet.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-08-09 16:02:19 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-09 20:42:45 +0000
commit91326c34ee1f1531d62caa153746821b58e6e55d (patch)
tree0d5ca763efa6807b1f352d9ae9bc0537f9ed12f1 /src/gpu/GrProcessorSet.h
parent6a14edc8d8762a54a174c2df1bee5715fc0a0526 (diff)
Move GrProcessorSet into GrPipeline
Change-Id: Ibfa5e1adda3c32140590aa62a31d35654cef79dd Reviewed-on: https://skia-review.googlesource.com/28187 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrProcessorSet.h')
-rw-r--r--src/gpu/GrProcessorSet.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gpu/GrProcessorSet.h b/src/gpu/GrProcessorSet.h
index e3fe4c64b2..d3aaf6dd61 100644
--- a/src/gpu/GrProcessorSet.h
+++ b/src/gpu/GrProcessorSet.h
@@ -17,15 +17,18 @@
class GrAppliedClip;
class GrXPFactory;
-class GrProcessorSet : private SkNoncopyable {
+class GrProcessorSet {
private:
// Arbitrary constructor arg for empty set and analysis
enum class Empty { kEmpty };
public:
- GrProcessorSet(GrPaint&& paint);
- GrProcessorSet(SkBlendMode mode);
+ GrProcessorSet(GrPaint&&);
+ GrProcessorSet(SkBlendMode);
GrProcessorSet(sk_sp<GrFragmentProcessor> colorFP);
+ GrProcessorSet(GrProcessorSet&&);
+ GrProcessorSet(const GrProcessorSet&) = delete;
+ GrProcessorSet& operator=(const GrProcessorSet&) = delete;
~GrProcessorSet();
@@ -136,6 +139,7 @@ public:
/** These are valid only for non-LCD coverage. */
static const GrProcessorSet& EmptySet();
+ static GrProcessorSet MakeEmptySet();
static constexpr const Analysis EmptySetAnalysis() { return Analysis(Empty::kEmpty); }
SkString dumpProcessors() const;
@@ -151,6 +155,10 @@ private:
union XP {
XP(const GrXPFactory* factory) : fFactory(factory) {}
XP(const GrXferProcessor* processor) : fProcessor(processor) {}
+ explicit XP(XP&& that) : fProcessor(that.fProcessor) {
+ SkASSERT(fProcessor == that.fProcessor);
+ that.fProcessor = nullptr;
+ }
const GrXPFactory* fFactory;
const GrXferProcessor* fProcessor;
};