Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Unified Diff: src/gpu/effects/GrDistanceFieldTextureEffect.h

Issue 41213003: Hook in rough distance field support for fonts (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Replace magic number 32 with constant; fix comment in shader; fix Linux compiler error. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | src/gpu/effects/GrDistanceFieldTextureEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrDistanceFieldTextureEffect.h
diff --git a/src/gpu/effects/GrCustomCoordsTextureEffect.h b/src/gpu/effects/GrDistanceFieldTextureEffect.h
old mode 100644
new mode 100755
similarity index 63%
copy from src/gpu/effects/GrCustomCoordsTextureEffect.h
copy to src/gpu/effects/GrDistanceFieldTextureEffect.h
index 1caecf2f6d6e96285feb6ed618c4d7d68e792456..34d4ae536347e07691de69c52ece3cb67cef3834
--- a/src/gpu/effects/GrCustomCoordsTextureEffect.h
+++ b/src/gpu/effects/GrDistanceFieldTextureEffect.h
@@ -5,38 +5,39 @@
* found in the LICENSE file.
*/
-#ifndef GrCustomCoordsTextureEffect_DEFINED
-#define GrCustomCoordsTextureEffect_DEFINED
+#ifndef GrDistanceFieldTextureEffect_DEFINED
+#define GrDistanceFieldTextureEffect_DEFINED
#include "GrEffect.h"
#include "GrVertexEffect.h"
-class GrGLCustomCoordsTextureEffect;
+class GrGLDistanceFieldTextureEffect;
/**
- * The output color of this effect is a modulation of the input color and a sample from a texture.
+ * The output color of this effect is a modulation of the input color and a sample from a
+ * distance field texture (using a smoothed step function near 0.5).
* It allows explicit specification of the filtering and wrap modes (GrTextureParams). The input
* coords are a custom attribute.
*/
-class GrCustomCoordsTextureEffect : public GrVertexEffect {
+class GrDistanceFieldTextureEffect : public GrVertexEffect {
public:
static GrEffectRef* Create(GrTexture* tex, const GrTextureParams& p) {
- AutoEffectUnref effect(SkNEW_ARGS(GrCustomCoordsTextureEffect, (tex, p)));
+ AutoEffectUnref effect(SkNEW_ARGS(GrDistanceFieldTextureEffect, (tex, p)));
return CreateEffectRef(effect);
}
- virtual ~GrCustomCoordsTextureEffect() {}
+ virtual ~GrDistanceFieldTextureEffect() {}
static const char* Name() { return "Texture"; }
virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags) const SK_OVERRIDE;
- typedef GrGLCustomCoordsTextureEffect GLEffect;
+ typedef GrGLDistanceFieldTextureEffect GLEffect;
virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE;
private:
- GrCustomCoordsTextureEffect(GrTexture* texture, const GrTextureParams& params);
+ GrDistanceFieldTextureEffect(GrTexture* texture, const GrTextureParams& params);
virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE;
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | src/gpu/effects/GrDistanceFieldTextureEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698