blob: 8c670e171d73279c4d2479d750e7e11e916abc51 [file] [log] [blame]
/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef GrCCClipProcessor_DEFINED
#define GrCCClipProcessor_DEFINED
#include "GrFragmentProcessor.h"
class GrCCClipPath;
class GrCCClipProcessor : public GrFragmentProcessor {
public:
enum class MustCheckBounds : bool {
kNo = false,
kYes = true
};
GrCCClipProcessor(const GrCCClipPath*, MustCheckBounds, SkPath::FillType overrideFillType);
const char* name() const override { return "GrCCClipProcessor"; }
std::unique_ptr<GrFragmentProcessor> clone() const override;
void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
private:
const GrCCClipPath* const fClipPath;
const bool fMustCheckBounds;
const SkPath::FillType fOverrideFillType;
const TextureSampler fAtlasAccess;
class Impl;
typedef GrFragmentProcessor INHERITED;
};
#endif