When recording a GM to a picture, pass the GM's size to beginRecording.
authorscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 21 Sep 2012 19:12:32 +0000 (19:12 +0000)
committerscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 21 Sep 2012 19:12:32 +0000 (19:12 +0000)
Review URL: https://codereview.appspot.com/6552047

git-svn-id: http://skia.googlecode.com/svn/trunk@5644 2bbb7eff-a529-9590-31e7-b0007b416f81

gm/gmmain.cpp

index c4ed298efa8d70a2255db76e5508f89ece7a80c2..c5a72dd8ad8cd626f946d8a6c1d0c430b23c96f3 100644 (file)
@@ -508,7 +508,8 @@ static ErrorBitfield handle_test_results(GM* gm,
 static SkPicture* generate_new_picture(GM* gm) {
     // Pictures are refcounted so must be on heap
     SkPicture* pict = new SkPicture;
-    SkCanvas* cv = pict->beginRecording(1000, 1000);
+    SkISize size = gm->getISize();
+    SkCanvas* cv = pict->beginRecording(size.width(), size.height());
     invokeGM(gm, cv);
     pict->endRecording();