// would cache the SkMatrix::hasPerspective result. Alternatively, have
// the MC stack just set a hasPerspective boolean as it is updated.
if (this->getTotalMatrix().hasPerspective()) {
- // TODO: consider implementing some half-plane test between the
+ // TODO: consider implementing some half-plane test between the
// two Y planes and the device-bounds (i.e., project the top and
// bottom Y planes and then determine if the clip bounds is completely
// outside either one).
#include "GrTBackendEffectFactory.h"
#include "GrTexture.h"
-// The distance field is constructed as unsigned char values, so that the zero value is at 128,
-// and the range is [-4, 4 - 1/255). Hence our multiplier is 8 - 1/32 and zero threshold is 128/255.
+// The distance field is constructed as unsigned char values, so that the zero value is at 128,
+// and the range is [-4, 4 - 1/255). Hence our multiplier is 8 - 1/32 and zero threshold is 128/255.
#define MULTIPLIER "7.96875"
#define THRESHOLD "0.50196078431"
class GrGLDistanceFieldTextureEffect : public GrGLVertexEffect {
public:
- GrGLDistanceFieldTextureEffect(const GrBackendEffectFactory& factory,
+ GrGLDistanceFieldTextureEffect(const GrBackendEffectFactory& factory,
const GrDrawEffect& drawEffect)
: INHERITED (factory)
, fTextureSize(SkSize::Make(-1.f,-1.f)) {}
virtual void setData(const GrGLUniformManager& uman,
const GrDrawEffect& drawEffect) SK_OVERRIDE {
SkASSERT(fTextureSizeUni.isValid());
- const GrDistanceFieldTextureEffect& distanceFieldEffect =
+ const GrDistanceFieldTextureEffect& distanceFieldEffect =
drawEffect.castEffect<GrDistanceFieldTextureEffect>();
if (distanceFieldEffect.getSize().width() != fTextureSize.width() ||
distanceFieldEffect.getSize().height() != fTextureSize.height()) {
fTextureSize = distanceFieldEffect.getSize();
- uman.set2f(fTextureSizeUni,
+ uman.set2f(fTextureSizeUni,
distanceFieldEffect.getSize().width(),
distanceFieldEffect.getSize().height());
}
virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE;
private:
- GrDistanceFieldTextureEffect(GrTexture* texture, const GrTextureParams& params,
+ GrDistanceFieldTextureEffect(GrTexture* texture, const GrTextureParams& params,
const SkISize& textureSize);
virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE;