aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects
diff options
context:
space:
mode:
authorGravatar Florin Malita <fmalita@chromium.org>2017-05-30 14:26:18 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-30 20:34:29 +0000
commit64790a3714467300848971aa153aca8cea91cf7b (patch)
treeded356ba8c9696866654df7d7c85b43fa71685e8 /src/effects
parentf2ae2b2dbcbdcc31b72fa86ed79f1cc02220528d (diff)
Delete SkGaussianEdgeShader
No longer used. Change-Id: I65a61696060ca19f528066ea587e140798450e36 Reviewed-on: https://skia-review.googlesource.com/18132 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'src/effects')
-rw-r--r--src/effects/SkGaussianEdgeShader.cpp95
-rw-r--r--src/effects/SkGaussianEdgeShader.h27
2 files changed, 0 insertions, 122 deletions
diff --git a/src/effects/SkGaussianEdgeShader.cpp b/src/effects/SkGaussianEdgeShader.cpp
deleted file mode 100644
index c710b949d3..0000000000
--- a/src/effects/SkGaussianEdgeShader.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright 2016 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "SkGaussianEdgeShader.h"
-#include "SkReadBuffer.h"
-#include "SkWriteBuffer.h"
-
-class SkArenaAlloc;
-
- /** \class SkGaussianEdgeShaderImpl
- This subclass of shader applies a Gaussian to shadow edge
-
- 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.
-
- When not using implicit distance, then b in the input color represents the input to the
- blur function.
- */
-class SkGaussianEdgeShaderImpl : public SkShaderBase {
-public:
- SkGaussianEdgeShaderImpl() {}
-
- bool isOpaque() const override;
-
-#if SK_SUPPORT_GPU
- sk_sp<GrFragmentProcessor> asFragmentProcessor(const AsFPArgs&) const override;
-#endif
-
- SK_TO_STRING_OVERRIDE()
- SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkGaussianEdgeShaderImpl)
-
-protected:
- void flatten(SkWriteBuffer&) const override;
- Context* onMakeContext(const ContextRec& rec, SkArenaAlloc* storage) const override {
- return nullptr;
- }
-private:
- friend class SkGaussianEdgeShader;
-
- typedef SkShaderBase INHERITED;
-};
-
-////////////////////////////////////////////////////////////////////////////
-
-#if SK_SUPPORT_GPU
-
-#include "effects/GrBlurredEdgeFragmentProcessor.h"
-
-////////////////////////////////////////////////////////////////////////////
-
-sk_sp<GrFragmentProcessor> SkGaussianEdgeShaderImpl::asFragmentProcessor(const AsFPArgs&) const {
- return GrBlurredEdgeFP::Make(GrBlurredEdgeFP::kGaussian_Mode);
-}
-
-#endif
-
-////////////////////////////////////////////////////////////////////////////
-
-bool SkGaussianEdgeShaderImpl::isOpaque() const {
- return false;
-}
-
-////////////////////////////////////////////////////////////////////////////
-
-#ifndef SK_IGNORE_TO_STRING
-void SkGaussianEdgeShaderImpl::toString(SkString* str) const {
- str->appendf("GaussianEdgeShader: ()");
-}
-#endif
-
-sk_sp<SkFlattenable> SkGaussianEdgeShaderImpl::CreateProc(SkReadBuffer& buf) {
- return sk_make_sp<SkGaussianEdgeShaderImpl>();
-}
-
-void SkGaussianEdgeShaderImpl::flatten(SkWriteBuffer& buf) const {
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
-sk_sp<SkShader> SkGaussianEdgeShader::Make() {
- return sk_make_sp<SkGaussianEdgeShaderImpl>();
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
-SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkGaussianEdgeShader)
-SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkGaussianEdgeShaderImpl)
-SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
-
-///////////////////////////////////////////////////////////////////////////////
diff --git a/src/effects/SkGaussianEdgeShader.h b/src/effects/SkGaussianEdgeShader.h
deleted file mode 100644
index f0554dd0a7..0000000000
--- a/src/effects/SkGaussianEdgeShader.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2016 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkGaussianEdgeShader_DEFINED
-#define SkGaussianEdgeShader_DEFINED
-
-#include "SkShaderBase.h"
-
-class SK_API SkGaussianEdgeShader {
-public:
- /** Returns a shader that applies a Gaussian blur depending on distance to the edge
- * Currently this is only useable with Circle and RRect shapes on the GPU backend.
- * Raster will draw nothing.
- */
- static sk_sp<SkShader> Make();
-
- SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
-
-private:
- SkGaussianEdgeShader(); // can't be instantiated
-};
-
-#endif