aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-04-20 17:20:24 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-21 16:02:31 +0000
commit54cbcd7056a1a56946f177059b1a5537f131271a (patch)
tree8b5e8185536940d4add8a107b14f5e5338754fee /include
parentc17dc24fa9994eacc640d3adc6633a02fd96d3fc (diff)
Remove all headers from include/gpu/effects
TBR=bsalomon@google.com Change-Id: I9ad2fa41262693b3a83bef625eac332eb1e71a3d Reviewed-on: https://skia-review.googlesource.com/13988 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/gpu/effects/GrBlurredEdgeFragmentProcessor.h68
-rw-r--r--include/gpu/effects/GrConstColorProcessor.h78
-rw-r--r--include/gpu/effects/GrXfermodeFragmentProcessor.h35
3 files changed, 0 insertions, 181 deletions
diff --git a/include/gpu/effects/GrBlurredEdgeFragmentProcessor.h b/include/gpu/effects/GrBlurredEdgeFragmentProcessor.h
deleted file mode 100644
index d0864ed864..0000000000
--- a/include/gpu/effects/GrBlurredEdgeFragmentProcessor.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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 GrBlurredEdgeFragmentProcessor_DEFINED
-#define GrBlurredEdgeFragmentProcessor_DEFINED
-
-#include "GrFragmentProcessor.h"
-
-/**
- * Shader for managing a blurred edge for a shadow.
- *
- * There are two blurring modes supported: Gaussian blur function and smoothstep function.
- *
- * If the primitive supports an implicit distance to the edge, the radius of the blur is specified
- * by r & g values of the color in 14.2 fixed point. For spot shadows, we increase the stroke width
- * to set the shadow against the shape. This pad is specified by b, also in 6.2 fixed point.
- * The a value represents the max final alpha.
- *
- * When not using implicit distance, then b in the input color represents the input to the
- * blur function, and r the max final alpha.
- *
- */
-class GrBlurredEdgeFP : public GrFragmentProcessor {
-public:
- enum Mode {
- kGaussian_Mode,
- kSmoothstep_Mode,
-
- kLastMode = kSmoothstep_Mode
- };
- static const int kModeCnt = kLastMode + 1;
-
- static sk_sp<GrFragmentProcessor> Make(Mode mode = kGaussian_Mode) {
- return sk_sp<GrFragmentProcessor>(new GrBlurredEdgeFP(mode));
- }
-
- const char* name() const override { return "BlurredEdge"; }
-
- Mode mode() const { return fMode; }
-
-private:
- GrBlurredEdgeFP(Mode mode)
- : INHERITED(kNone_OptimizationFlags)
- , fMode(mode) {
- // enable output of distance information for shape
- this->setWillUseDistanceVectorField();
-
- this->initClassID<GrBlurredEdgeFP>();
- }
-
- GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
-
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
-
- bool onIsEqual(const GrFragmentProcessor&) const override;
-
- GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
-
- Mode fMode;
-
- typedef GrFragmentProcessor INHERITED;
-};
-
-#endif
diff --git a/include/gpu/effects/GrConstColorProcessor.h b/include/gpu/effects/GrConstColorProcessor.h
deleted file mode 100644
index b543aa5069..0000000000
--- a/include/gpu/effects/GrConstColorProcessor.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2015 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef GrColorProcessor_DEFINED
-#define GrColorProcessor_DEFINED
-
-#include "GrFragmentProcessor.h"
-
-/**
- * This is a simple GrFragmentProcessor that outputs a constant color. It may do one of the
- * following with its input color: ignore it, or multiply it by the constant color, multiply its
- * alpha by the constant color and ignore the input color's r, g, and b.
- */
-class GrConstColorProcessor : public GrFragmentProcessor {
-public:
- enum InputMode {
- kIgnore_InputMode,
- kModulateRGBA_InputMode,
- kModulateA_InputMode,
-
- kLastInputMode = kModulateA_InputMode
- };
- static const int kInputModeCnt = kLastInputMode + 1;
-
- static sk_sp<GrFragmentProcessor> Make(GrColor4f color, InputMode mode) {
- return sk_sp<GrFragmentProcessor>(new GrConstColorProcessor(color, mode));
- }
-
- const char* name() const override { return "Color"; }
-
- SkString dumpInfo() const override {
- SkString str;
- str.appendf("Color: 0x%08x", fColor.toGrColor());
- return str;
- }
-
- GrColor4f color() const { return fColor; }
-
- InputMode inputMode() const { return fMode; }
-
-private:
- static OptimizationFlags OptFlags(GrColor4f color, InputMode mode) {
- OptimizationFlags flags = kConstantOutputForConstantInput_OptimizationFlag;
- if (mode != kIgnore_InputMode) {
- flags |= kCompatibleWithCoverageAsAlpha_OptimizationFlag;
- }
- if (color.isOpaque()) {
- flags |= kPreservesOpaqueInput_OptimizationFlag;
- }
- return flags;
- }
-
- GrConstColorProcessor(GrColor4f color, InputMode mode)
- : INHERITED(OptFlags(color, mode)), fColor(color), fMode(mode) {
- this->initClassID<GrConstColorProcessor>();
- }
-
- GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
-
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
-
- bool onIsEqual(const GrFragmentProcessor&) const override;
-
- GrColor4f constantOutputForConstantInput(GrColor4f input) const override;
-
- GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
-
- GrColor4f fColor;
- InputMode fMode;
-
- typedef GrFragmentProcessor INHERITED;
-};
-
-#endif
diff --git a/include/gpu/effects/GrXfermodeFragmentProcessor.h b/include/gpu/effects/GrXfermodeFragmentProcessor.h
deleted file mode 100644
index edc5ae71e1..0000000000
--- a/include/gpu/effects/GrXfermodeFragmentProcessor.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2015 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef GrXfermodeFragmentProcessor_DEFINED
-#define GrXfermodeFragmentProcessor_DEFINED
-
-#include "SkRefCnt.h"
-#include "SkBlendMode.h"
-
-class GrFragmentProcessor;
-
-namespace GrXfermodeFragmentProcessor {
- /** The color input to the returned processor is treated as the src and the passed in processor
- is the dst. */
- sk_sp<GrFragmentProcessor> MakeFromDstProcessor(sk_sp<GrFragmentProcessor> dst,
- SkBlendMode mode);
-
- /** The color input to the returned processor is treated as the dst and the passed in processor
- is the src. */
- sk_sp<GrFragmentProcessor> MakeFromSrcProcessor(sk_sp<GrFragmentProcessor> src,
- SkBlendMode mode);
-
- /** Takes the input color, which is assumed to be unpremultiplied, passes it as an opaque color
- to both src and dst. The outputs of a src and dst are blended using mode and the original
- input's alpha is applied to the blended color to produce a premul output. */
- sk_sp<GrFragmentProcessor> MakeFromTwoProcessors(sk_sp<GrFragmentProcessor> src,
- sk_sp<GrFragmentProcessor> dst,
- SkBlendMode mode);
-};
-
-#endif