Index: gm/picture.cpp |
diff --git a/gm/picture.cpp b/gm/picture.cpp |
index b07a5969a99ec31748489be07d61731bef21f187..5432fc93ef73b6793983c559db6073f57a65b03a 100644 |
--- a/gm/picture.cpp |
+++ b/gm/picture.cpp |
@@ -39,9 +39,15 @@ static SkPicture* make_picture() { |
// |
class PictureGM : public skiagm::GM { |
public: |
- PictureGM() : fPicture(make_picture()) {} |
+ PictureGM() |
+ : fPicture(NULL) |
+ {} |
protected: |
+ void onOnceBeforeDraw() SK_OVERRIDE { |
+ fPicture.reset(make_picture()); |
+ } |
+ |
SkString onShortName() SK_OVERRIDE { |
return SkString("pictures"); |
} |