aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects
diff options
context:
space:
mode:
authorGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-06-05 14:43:55 +0000
committerGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-06-05 14:43:55 +0000
commitec3d6e5a2fada32dfc762ed82ca6155746f664a3 (patch)
tree4701280de540bbd48ca88cc512589b44cac56691 /src/effects
parent9b46e77ec2b387f4502926c2b9bf09450eec257c (diff)
update for cache updates
git-svn-id: http://skia.googlecode.com/svn/trunk@202 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/effects')
-rw-r--r--src/effects/SkGradientShader.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/effects/SkGradientShader.cpp b/src/effects/SkGradientShader.cpp
index 047c482384..696def6993 100644
--- a/src/effects/SkGradientShader.cpp
+++ b/src/effects/SkGradientShader.cpp
@@ -130,7 +130,7 @@ protected:
const SkPMColor* getCache32();
// called when we kill our cached colors (to be rebuilt later on demand)
- virtual void onCacheReset() {}
+ virtual void onCacheReset() = 0;
private:
enum {
@@ -635,7 +635,9 @@ public:
}
protected:
- Linear_Gradient(SkFlattenableReadBuffer& buffer) : Gradient_Shader(buffer) {};
+ Linear_Gradient(SkFlattenableReadBuffer& buffer) : Gradient_Shader(buffer) {
+ fCachedBitmap = NULL;
+ }
virtual Factory getFactory() { return CreateProc; }
private:
@@ -1181,6 +1183,7 @@ public:
protected:
Radial_Gradient(SkFlattenableReadBuffer& buffer) : Gradient_Shader(buffer) {};
virtual Factory getFactory() { return CreateProc; }
+ virtual void onCacheReset() {}
private:
typedef Gradient_Shader INHERITED;
@@ -1205,8 +1208,8 @@ public:
protected:
Sweep_Gradient(SkFlattenableReadBuffer& buffer) : Gradient_Shader(buffer) {}
-
virtual Factory getFactory() { return CreateProc; }
+ virtual void onCacheReset() {}
private:
typedef Gradient_Shader INHERITED;