aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/GrAlphaThresholdFragmentProcessor.h
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-07-11 14:35:28 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-12 13:28:25 +0000
commit46b654df9e70bbfacf6dc45d3a2a7ceb13a61edb (patch)
tree1df670da50b5c02defe6507cb87f2a213a801750 /src/effects/GrAlphaThresholdFragmentProcessor.h
parent6ee29658202a0bd8394df5daed8db30321c01cc9 (diff)
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>
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 702b6aeb88..5dd669ac14 100644
--- a/src/effects/GrAlphaThresholdFragmentProcessor.h
+++ b/src/effects/GrAlphaThresholdFragmentProcessor.h
@@ -16,6 +16,7 @@
#include "GrColorSpaceXform.h"
#include "GrFragmentProcessor.h"
#include "GrCoordTransform.h"
+#include "GrColorSpaceXform.h"
#include "effects/GrProxyMove.h"
class GrAlphaThresholdFragmentProcessor : public GrFragmentProcessor {
public:
@@ -44,35 +45,34 @@ 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) {
-
- this->addCoordTransform(&fImageCoordTransform);
- this->addCoordTransform(&fMaskCoordTransform);
+ , fOuterThreshold(outerThreshold)
+ , fImageCoordTransform(
+ SkMatrix::I()
+, fImage.proxy())
+ , fMaskCoordTransform(
+ SkMatrix::MakeTrans(SkIntToScalar(-bounds.x()), SkIntToScalar(-bounds.y()))
+, fMask.proxy()) {
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