aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrEffect.h
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2014-09-16 08:21:41 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-09-16 08:21:42 -0700
commit49586bec7383d4ccb81f85f8e2dc4162e2d4f6a8 (patch)
tree715c9fa39ab2e4b790c401f2c0399be200bbbfc8 /include/gpu/GrEffect.h
parent8a4c1030ff4b8336b5ac5b0712691e2f65383440 (diff)
removing GrDrawEffect
BUG=skia: Committed: https://skia.googlesource.com/skia/+/8ddbe8b9366c8c59c4fb55f01f253de8a0b37d6e R=bsalomon@google.com Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/571163002
Diffstat (limited to 'include/gpu/GrEffect.h')
-rw-r--r--include/gpu/GrEffect.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/include/gpu/GrEffect.h b/include/gpu/GrEffect.h
index 102b9d4b96..e9259979f0 100644
--- a/include/gpu/GrEffect.h
+++ b/include/gpu/GrEffect.h
@@ -130,6 +130,11 @@ public:
::operator delete(target, placement);
}
+ /**
+ * Helper for down-casting to a GrEffect subclass
+ */
+ template <typename T> const T& cast() const { return *static_cast<const T*>(this); }
+
protected:
/**
* Subclasses call this from their constructor to register coordinate transformations. The
@@ -155,13 +160,6 @@ protected:
, fRequiresVertexShader(false) {}
/**
- * Helper for down-casting to a GrEffect subclass
- */
- template <typename T> static const T& CastEffect(const GrEffect& effect) {
- return *static_cast<const T*>(&effect);
- }
-
- /**
* If the effect subclass will read the destination pixel value then it must call this function
* from its constructor. Otherwise, when its generated backend-specific effect class attempts
* to generate code that reads the destination pixel it will fail.