diff options
author | 2014-09-16 07:17:28 -0700 | |
---|---|---|
committer | 2014-09-16 07:17:28 -0700 | |
commit | 08da4f22d790cfc51bbeb10b4b84dab49cf0eaec (patch) | |
tree | eb2c5cc2e59b708065484e18c01f459f6ef59ee9 /include/gpu/GrEffect.h | |
parent | 8ddbe8b9366c8c59c4fb55f01f253de8a0b37d6e (diff) |
Revert of removing GrDrawEffect (patchset #4 id:60001 of https://codereview.chromium.org/571163002/)
Reason for revert:
reverting to unblock another revert
Original issue's description:
> removing GrDrawEffect
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/8ddbe8b9366c8c59c4fb55f01f253de8a0b37d6e
R=bsalomon@google.com
TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: joshualitt@chromium.org
Review URL: https://codereview.chromium.org/577593003
Diffstat (limited to 'include/gpu/GrEffect.h')
-rw-r--r-- | include/gpu/GrEffect.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/gpu/GrEffect.h b/include/gpu/GrEffect.h index e9259979f0..102b9d4b96 100644 --- a/include/gpu/GrEffect.h +++ b/include/gpu/GrEffect.h @@ -130,11 +130,6 @@ 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 @@ -160,6 +155,13 @@ 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. |