Fixed bug in SkSurface_Gpu to make the surface receive the new copy when copy
on write happens.
Review URL: https://codereview.chromium.org/13195002

git-svn-id: http://skia.googlecode.com/svn/trunk@8622 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/image/SkImage_Picture.cpp b/src/image/SkImage_Picture.cpp
index 447299f..be934fa 100644
--- a/src/image/SkImage_Picture.cpp
+++ b/src/image/SkImage_Picture.cpp
@@ -16,6 +16,8 @@
 
     virtual void onDraw(SkCanvas*, SkScalar, SkScalar, const SkPaint*) SK_OVERRIDE;
 
+    SkPicture* getPicture() { return fPicture; }
+
 private:
     SkPicture*  fPicture;
 
@@ -52,3 +54,7 @@
 
     return SkNEW_ARGS(SkImage_Picture, (playback));
 }
+
+SkPicture* SkPictureImageGetPicture(SkImage* pictureImage) {
+    return static_cast<SkImage_Picture*>(pictureImage)->getPicture();
+}