aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/SkDraw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkDraw.cpp')
-rw-r--r--src/core/SkDraw.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index 23a6d59..19337f7 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -114,7 +114,23 @@ private:
///////////////////////////////////////////////////////////////////////////////
SkDraw::SkDraw() {
- sk_bzero(this, sizeof(*this));
+ //Be noted to update this field when struture is changed!
+ if( sizeof(*this) == 40 ){
+ fBitmap = NULL;
+ fMatrix = NULL;
+ fClip = NULL;
+ fRC = NULL;
+
+ fClipStack = NULL;
+ fDevice = NULL;
+ fBounder = NULL;
+ fProcs = NULL;
+
+ fMVMatrix = NULL;
+ fExtMatrix = NULL;
+ } else {
+ sk_bzero(this, sizeof(*this));
+ }
}
SkDraw::SkDraw(const SkDraw& src) {