1 /* 2 * Copyright 2019 Google LLC. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #ifndef GrSampleMaskProcessor_DEFINED 9 #define GrSampleMaskProcessor_DEFINED 10 11 #include "src/gpu/ccpr/GrCCCoverageProcessor.h" 12 13 /** 14 * This class implements GrCCCoverageProcessor with MSAA using the sample mask. 15 */ 16 class GrSampleMaskProcessor : public GrCCCoverageProcessor { 17 public: GrSampleMaskProcessor()18 GrSampleMaskProcessor() : GrCCCoverageProcessor(kGrSampleMaskProcessor_ClassID) {} 19 20 private: 21 void reset(PrimitiveType, GrResourceProvider*) override; 22 23 void appendMesh(sk_sp<const GrGpuBuffer> instanceBuffer, int instanceCount, int baseInstance, 24 SkTArray<GrMesh>* out) const override; 25 26 GrGLSLPrimitiveProcessor* onCreateGLSLInstance(std::unique_ptr<Shader>) const override; 27 28 SkSTArray<2, Attribute> fInputAttribs; 29 30 class Impl; 31 }; 32 33 #endif 34