diff options
author | joshualitt <joshualitt@chromium.org> | 2014-09-16 06:46:30 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-16 06:46:30 -0700 |
commit | 8ddbe8b9366c8c59c4fb55f01f253de8a0b37d6e (patch) | |
tree | 737dce511f4f0314e313c825a7db8a38b3544a94 /include/gpu/GrEffect.h | |
parent | ee6206572b42fec11f83ad0c1e6d435903640518 (diff) |
removing GrDrawEffect
BUG=skia:
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.h | 12 |
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. |