aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/GrAlphaThresholdFragmentProcessor.h
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-07-12 13:51:34 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-12 13:51:46 +0000
commitbaf981f71614e7a2fbe6af2726e65126d431ed8e (patch)
tree1efed95d65f841bbbe8006165f37d9f03a0c0972 /src/effects/GrAlphaThresholdFragmentProcessor.h
parent46b654df9e70bbfacf6dc45d3a2a7ceb13a61edb (diff)
Revert "converted GrSimpleTextureEffect to sksl"
This reverts commit 46b654df9e70bbfacf6dc45d3a2a7ceb13a61edb. Reason for revert: making Vulkan mad Original change's description: > converted GrSimpleTextureEffect to sksl > > Bug: skia: > Change-Id: If556c6baad75f22135f429759feabaaec095b900 > Reviewed-on: https://skia-review.googlesource.com/21720 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,ethannicholas@google.com Change-Id: I06fac3d106435e1d58e19cc54a919c5d84784d92 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/22266 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/effects/GrAlphaThresholdFragmentProcessor.h')
-rw-r--r--src/effects/GrAlphaThresholdFragmentProcessor.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/effects/GrAlphaThresholdFragmentProcessor.h b/src/effects/GrAlphaThresholdFragmentProcessor.h
index 5dd669ac14..702b6aeb88 100644
--- a/src/effects/GrAlphaThresholdFragmentProcessor.h
+++ b/src/effects/GrAlphaThresholdFragmentProcessor.h
@@ -16,7 +16,6 @@
#include "GrColorSpaceXform.h"
#include "GrFragmentProcessor.h"
#include "GrCoordTransform.h"
-#include "GrColorSpaceXform.h"
#include "effects/GrProxyMove.h"
class GrAlphaThresholdFragmentProcessor : public GrFragmentProcessor {
public:
@@ -45,34 +44,35 @@ private:
const SkIRect& bounds
)
: INHERITED(kNone_OptimizationFlags)
+ ,
+ fImageCoordTransform(SkMatrix::I(), image.get()),
+ fMaskCoordTransform(SkMatrix::MakeTrans(SkIntToScalar(-bounds.x()), SkIntToScalar(-bounds.y())),
+ mask.get())
+
, fImage(std::move(image))
, fColorXform(colorXform)
, fMask(std::move(mask))
, fInnerThreshold(innerThreshold)
- , fOuterThreshold(outerThreshold)
- , fImageCoordTransform(
- SkMatrix::I()
-, fImage.proxy())
- , fMaskCoordTransform(
- SkMatrix::MakeTrans(SkIntToScalar(-bounds.x()), SkIntToScalar(-bounds.y()))
-, fMask.proxy()) {
+ , fOuterThreshold(outerThreshold) {
+
+ this->addCoordTransform(&fImageCoordTransform);
+ this->addCoordTransform(&fMaskCoordTransform);
this->addTextureSampler(&fImage);
this->addTextureSampler(&fMask);
- this->addCoordTransform(&fImageCoordTransform);
- this->addCoordTransform(&fMaskCoordTransform);
this->initClassID<GrAlphaThresholdFragmentProcessor>();
}
GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
void onGetGLSLProcessorKey(const GrShaderCaps&,GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
GR_DECLARE_FRAGMENT_PROCESSOR_TEST
+
+ GrCoordTransform fImageCoordTransform;
+ GrCoordTransform fMaskCoordTransform;
TextureSampler fImage;
sk_sp<GrColorSpaceXform> fColorXform;
TextureSampler fMask;
float fInnerThreshold;
float fOuterThreshold;
- GrCoordTransform fImageCoordTransform;
- GrCoordTransform fMaskCoordTransform;
typedef GrFragmentProcessor INHERITED;
};
#endif