aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-22 20:35:13 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-22 20:35:13 +0000
commit8a252f79629b189a03de22cd8ff0312c5bccedd1 (patch)
tree8c2aa239766105fe6b5079c349b6a302c922c983 /include
parent1e3052354ac155e3d9418cf7e8c8e009df524e01 (diff)
Switch GrEffect::onIsEqual signature back to GrEffect from GrEffectRef.
R=robertphillips@google.com Review URL: https://codereview.appspot.com/7188046 git-svn-id: http://skia.googlecode.com/svn/trunk@7326 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrEffect.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/gpu/GrEffect.h b/include/gpu/GrEffect.h
index 0e6aab027e..4d9202fe3e 100644
--- a/include/gpu/GrEffect.h
+++ b/include/gpu/GrEffect.h
@@ -123,7 +123,7 @@ public:
if (&this->getFactory() != &other->getFactory()) {
return false;
}
- bool result = this->onIsEqual(other);
+ bool result = this->onIsEqual(*other.get());
#if GR_DEBUG
if (result) {
GrAssert(this->numTextures() == other->numTextures());
@@ -209,9 +209,8 @@ protected:
/** Helper for getting the GrEffect out of a GrEffectRef and down-casting to a GrEffect subclass
*/
template <typename T>
- static const T& CastEffect(const GrEffectRef& effectRef) {
- GrAssert(NULL != effectRef.get());
- return *static_cast<const T*>(effectRef.get());
+ static const T& CastEffect(const GrEffect& effectRef) {
+ return *static_cast<const T*>(&effectRef);
}
private:
@@ -219,7 +218,7 @@ private:
/** Subclass implements this to support isEqual(). It will only be called if it is known that
the two effects are of the same subclass (i.e. they return the same object from
getFactory()).*/
- virtual bool onIsEqual(const GrEffectRef& other) const = 0;
+ virtual bool onIsEqual(const GrEffect& other) const = 0;
void EffectRefDestroyed() { fEffectRef = NULL; }