| Index: include/gpu/GrEffect.h
|
| diff --git a/include/gpu/GrEffect.h b/include/gpu/GrEffect.h
|
| index e9259979f0af3946deddf5523ed93d2fd194ecce..102b9d4b961ba89743c8b002426182633ad7b83f 100644
|
| --- a/include/gpu/GrEffect.h
|
| +++ b/include/gpu/GrEffect.h
|
| @@ -130,11 +130,6 @@
|
| ::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
|
| @@ -158,6 +153,13 @@
|
| , fWillReadFragmentPosition(false)
|
| , fWillUseInputColor(true)
|
| , 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
|
|
|