Our SkPicture::Analysis visitors should recurse into nested pictures.

BUG=skia:
R=tomhudson@google.com, mtklein@google.com, reed@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/495793002
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index 6a93a9d..cb29b37 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -843,6 +843,17 @@
     picture.reset(recorder.endRecording());
     // ... but only when applied to drawPoint() calls
     REPORTER_ASSERT(reporter, !picture->suitableForGpuRasterization(NULL));
+
+    // Nest the previous picture inside a new one.
+    // This doesn't work in the old backend.
+    if (useNewPath) {
+        canvas = GENERATE_CANVAS(recorder, useNewPath);
+        {
+            canvas->drawPicture(picture.get());
+        }
+        picture.reset(recorder.endRecording());
+        REPORTER_ASSERT(reporter, !picture->suitableForGpuRasterization(NULL));
+    }
 }
 
 #undef GENERATE_CANVAS
@@ -1043,6 +1054,17 @@
     }
     picture.reset(recorder.endRecording());
     REPORTER_ASSERT(reporter, picture->hasText());
+
+    // Nest the previous picture inside a new one.
+    // This doesn't work in the old backend.
+    if (useNewPath) {
+        canvas = BEGIN_RECORDING;
+        {
+            canvas->drawPicture(picture.get());
+        }
+        picture.reset(recorder.endRecording());
+        REPORTER_ASSERT(reporter, picture->hasText());
+    }
 #undef BEGIN_RECORDING
 }