blob: 3fdd96f5e806785053a23bb523b485ee0358fad0 [file] [log] [blame]
Chris Daltonc3318f02019-07-19 14:20:53 -06001/*
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 */
16class GrSampleMaskProcessor : public GrCCCoverageProcessor {
17public:
18 GrSampleMaskProcessor() : GrCCCoverageProcessor(kGrSampleMaskProcessor_ClassID) {}
19
20private:
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