Change-Id: I9d4cb34c54458ad42a413f251d1018217de26b90
Reviewed-on: https://skia-review.googlesource.com/17206
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Salomon <bsalomon@google.com>
#include "GrXferProcessor.h"
#include "effects/GrPorterDuffXferProcessor.h"
-const GrProcessorSet GrProcessorSet::gEmpty{GrProcessorSet::Empty::kEmpty};
+const GrProcessorSet& GrProcessorSet::EmptySet() {
+ static const GrProcessorSet gEmpty(GrProcessorSet::Empty::kEmpty);
+ return gEmpty;
+}
GrProcessorSet::GrProcessorSet(GrPaint&& paint) : fXP(paint.getXPFactory()) {
fFlags = 0;
bool isFinalized() const { return SkToBool(kFinalized_Flag & fFlags); }
- static const GrProcessorSet& EmptySet() { return gEmpty; }
+ static const GrProcessorSet& EmptySet();
static constexpr const Analysis EmptySetAnalysis() { return Analysis(Empty::kEmpty); }
private:
GrProcessorSet(Empty) : fXP((const GrXferProcessor*)nullptr), fFlags(kFinalized_Flag) {}
- static const GrProcessorSet gEmpty;
// This absurdly large limit allows Analysis and this to pack fields together.
static constexpr int kMaxColorProcessors = UINT8_MAX;