blob: f44de74975d542424905e1b1652f20f31e51beac [file] [log] [blame]
commit-bot@chromium.orgc2f78242014-02-19 15:18:05 +00001/*
2 * Copyright 2014 Google Inc.
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 GrRRectEffect_DEFINED
9#define GrRRectEffect_DEFINED
10
commit-bot@chromium.orge5280892014-02-21 17:52:29 +000011#include "GrTypes.h"
commit-bot@chromium.orgcabf4b22014-03-05 18:27:43 +000012#include "GrTypesPriv.h"
bungeman06ca8ec2016-06-09 08:01:03 -070013#include "SkRefCnt.h"
commit-bot@chromium.orgc2f78242014-02-19 15:18:05 +000014
Ethan Nicholas222e2752018-10-11 11:21:34 -040015class GrContext;
joshualitteb2a6762014-12-04 11:35:33 -080016class GrFragmentProcessor;
Brian Salomon14471772017-12-05 10:35:15 -050017class GrShaderCaps;
joshualittb0a8a372014-09-23 09:50:21 -070018class GrProcessor;
commit-bot@chromium.orge5280892014-02-21 17:52:29 +000019class SkRRect;
commit-bot@chromium.orgc2f78242014-02-19 15:18:05 +000020
commit-bot@chromium.orge5280892014-02-21 17:52:29 +000021namespace GrRRectEffect {
Brian Salomonaff329b2017-08-11 09:40:37 -040022
23/**
24 * Creates an effect that performs anti-aliased clipping against a SkRRect. It doesn't support
25 * all varieties of SkRRect so the caller must check for a nullptr return.
26 */
Ethan Nicholas222e2752018-10-11 11:21:34 -040027std::unique_ptr<GrFragmentProcessor> Make(GrClipEdgeType, const SkRRect&, GrContext*);
commit-bot@chromium.orgc2f78242014-02-19 15:18:05 +000028};
29
commit-bot@chromium.orgc2f78242014-02-19 15:18:05 +000030#endif