aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-04-05 06:25:14 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-05 06:25:14 -0700
commit59dc5424240bf5974d15624c32cfbe0ece54fddc (patch)
tree841d894a3416839e8927afe24ee00f95b2b00725 /include
parent74f047b58b70935f21cc08d30b7cc789b22bc7cf (diff)
remove avoid and pixelxor xfermodes
Diffstat (limited to 'include')
-rw-r--r--include/client/android/SkAvoidXfermode.h81
-rw-r--r--include/client/android/SkPixelXorXfermode.h52
2 files changed, 0 insertions, 133 deletions
diff --git a/include/client/android/SkAvoidXfermode.h b/include/client/android/SkAvoidXfermode.h
deleted file mode 100644
index b752d07c40..0000000000
--- a/include/client/android/SkAvoidXfermode.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright 2006 The Android Open Source Project
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkAvoidXfermode_DEFINED
-#define SkAvoidXfermode_DEFINED
-
-#include "SkColor.h"
-#include "SkTypes.h"
-#include "SkXfermode.h"
-
-/** \class AvoidXfermode
-
- This xfermode will draw the src everywhere except on top of the specified
- color.
-*/
-class SkAvoidXfermode : public SkXfermode {
-public:
- enum Mode {
- kAvoidColor_Mode, //!< draw everywhere except on the opColor
- kTargetColor_Mode //!< draw only on top of the opColor
- };
-
- /** This xfermode draws, or doesn't draw, based on the destination's
- distance from an op-color.
-
- There are two modes, and each mode interprets a tolerance value.
-
- Avoid: In this mode, drawing is allowed only on destination pixels that
- are different from the op-color.
- Tolerance near 0: avoid any colors even remotely similar to the op-color
- Tolerance near 255: avoid only colors nearly identical to the op-color
-
- Target: In this mode, drawing only occurs on destination pixels that
- are similar to the op-color
- Tolerance near 0: draw only on colors that are nearly identical to the op-color
- Tolerance near 255: draw on any colors even remotely similar to the op-color
- */
- static sk_sp<SkXfermode> Make(SkColor opColor, U8CPU tolerance, Mode mode) {
- return sk_sp<SkXfermode>(new SkAvoidXfermode(opColor, tolerance, mode));
- }
-#ifdef SK_SUPPORT_LEGACY_XFERMODE_PTR
- static SkAvoidXfermode* Create(SkColor opColor, U8CPU tolerance, Mode mode) {
- return (SkAvoidXfermode*)(Make(opColor, tolerance, mode).release());
- }
-#endif
-
- // overrides from SkXfermode
- void xfer32(SkPMColor dst[], const SkPMColor src[], int count,
- const SkAlpha aa[]) const override;
- void xfer16(uint16_t dst[], const SkPMColor src[], int count,
- const SkAlpha aa[]) const override;
- void xferA8(SkAlpha dst[], const SkPMColor src[], int count,
- const SkAlpha aa[]) const override;
-
-#if SK_SUPPORT_GPU
- const GrFragmentProcessor* getFragmentProcessorForImageFilter(
- const GrFragmentProcessor* dst) const override;
- GrXPFactory* asXPFactory() const override;
-#endif
-
- SK_TO_STRING_OVERRIDE()
- SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(AvoidXfermode)
-
-protected:
- SkAvoidXfermode(SkColor opColor, U8CPU tolerance, Mode mode);
- void flatten(SkWriteBuffer&) const override;
-
-private:
- SkColor fOpColor;
- uint32_t fDistMul; // x.14 cached from fTolerance
- uint8_t fTolerance;
- Mode fMode;
-
- typedef SkXfermode INHERITED;
-};
-
-#endif
diff --git a/include/client/android/SkPixelXorXfermode.h b/include/client/android/SkPixelXorXfermode.h
deleted file mode 100644
index b6fd979926..0000000000
--- a/include/client/android/SkPixelXorXfermode.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2007 The Android Open Source Project
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkPixelXorXfermode_DEFINED
-#define SkPixelXorXfermode_DEFINED
-
-#include "SkXfermode.h"
-
-/** SkPixelXorXfermode implements a simple pixel xor (op ^ src ^ dst).
- This transformation does not follow premultiplied conventions, therefore
- this proc *always* returns an opaque color (alpha == 255). Thus it is
- not really usefull for operating on blended colors.
-*/
-class SK_API SkPixelXorXfermode : public SkXfermode {
-public:
- static sk_sp<SkXfermode> Make(SkColor opColor) {
- return sk_sp<SkXfermode>(new SkPixelXorXfermode(opColor));
- }
-#ifdef SK_SUPPORT_LEGACY_XFERMODE_PTR
- static SkXfermode* Create(SkColor opColor) {
- return Make(opColor).release();
- }
-#endif
-
-#if SK_SUPPORT_GPU
- const GrFragmentProcessor* getFragmentProcessorForImageFilter(
- const GrFragmentProcessor* dst) const override;
- GrXPFactory* asXPFactory() const override;
-#endif
-
- SK_TO_STRING_OVERRIDE()
- SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPixelXorXfermode)
-
-protected:
- void flatten(SkWriteBuffer&) const override;
- SkPMColor xferColor(SkPMColor src, SkPMColor dst) const override;
-
-private:
- explicit SkPixelXorXfermode(SkColor opColor) {
- fOpColor = SkPreMultiplyColor(opColor | 0xFF000000);
- }
-
- SkPMColor fOpColor;
-
- typedef SkXfermode INHERITED;
-};
-
-#endif