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

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

Issue 543623004: Removing vertex attrib indices (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: warning fixed Created 6 years, 3 months 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/effects/GrDashingEffect.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/GrDistanceFieldTextureEffect.h b/src/gpu/effects/GrDistanceFieldTextureEffect.h
index dca1949c506faf89acb68d6e95c0691d3a72fff2..5f08edaa7952c98e7a9af7557207b9047fce9cbc 100644
--- a/src/gpu/effects/GrDistanceFieldTextureEffect.h
+++ b/src/gpu/effects/GrDistanceFieldTextureEffect.h
@@ -9,7 +9,7 @@
#define GrDistanceFieldTextureEffect_DEFINED
#include "GrEffect.h"
-#include "GrVertexEffect.h"
+#include "GrGeometryProcessor.h"
class GrGLDistanceFieldTextureEffect;
class GrGLDistanceFieldLCDTextureEffect;
@@ -38,7 +38,7 @@ enum GrDistanceFieldEffectFlags {
* It allows explicit specification of the filtering and wrap modes (GrTextureParams). The input
* coords are a custom attribute. Gamma correction is handled via a texture LUT.
*/
-class GrDistanceFieldTextureEffect : public GrVertexEffect {
+class GrDistanceFieldTextureEffect : public GrGeometryProcessor {
public:
#ifdef SK_GAMMA_APPLY_TO_A8
static GrEffect* Create(GrTexture* tex, const GrTextureParams& params,
@@ -59,6 +59,8 @@ public:
static const char* Name() { return "DistanceFieldTexture"; }
virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags) const SK_OVERRIDE;
+
+ const GrShaderVar& inTextureCoords() const { return fInTextureCoords; }
#ifdef SK_GAMMA_APPLY_TO_A8
float getLuminance() const { return fLuminance; }
#endif
@@ -77,12 +79,13 @@ private:
virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE;
- GrTextureAccess fTextureAccess;
+ GrTextureAccess fTextureAccess;
#ifdef SK_GAMMA_APPLY_TO_A8
- GrTextureAccess fGammaTextureAccess;
- float fLuminance;
+ GrTextureAccess fGammaTextureAccess;
+ float fLuminance;
#endif
- uint32_t fFlags;
+ uint32_t fFlags;
+ const GrShaderVar& fInTextureCoords;
GR_DECLARE_EFFECT_TEST;
@@ -95,7 +98,7 @@ private:
* It allows explicit specification of the filtering and wrap modes (GrTextureParams). The input
* coords are a custom attribute. Gamma correction is handled via a texture LUT.
*/
-class GrDistanceFieldLCDTextureEffect : public GrVertexEffect {
+class GrDistanceFieldLCDTextureEffect : public GrGeometryProcessor {
public:
static GrEffect* Create(GrTexture* tex, const GrTextureParams& params,
GrTexture* gamma, const GrTextureParams& gammaParams,
@@ -108,6 +111,7 @@ public:
static const char* Name() { return "DistanceFieldLCDTexture"; }
+ const GrShaderVar& inTextureCoords() const { return fInTextureCoords; }
virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags) const SK_OVERRIDE;
GrColor getTextColor() const { return fTextColor; }
uint32_t getFlags() const { return fFlags; }
@@ -124,10 +128,11 @@ private:
virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE;
- GrTextureAccess fTextureAccess;
- GrTextureAccess fGammaTextureAccess;
- GrColor fTextColor;
- uint32_t fFlags;
+ GrTextureAccess fTextureAccess;
+ GrTextureAccess fGammaTextureAccess;
+ GrColor fTextColor;
+ uint32_t fFlags;
+ const GrShaderVar& fInTextureCoords;
GR_DECLARE_EFFECT_TEST;
« no previous file with comments | « src/gpu/effects/GrDashingEffect.cpp ('k') | src/gpu/effects/GrDistanceFieldTextureEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698