add getFlags() to gm baseclass
skip PDF for hairmodes for now, since it crashes



git-svn-id: http://skia.googlecode.com/svn/trunk@2282 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index a8178c4..a6930c6 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -435,10 +435,6 @@
                                   const SkBitmap& comparisonBitmap,
                                   const char readPath [],
                                   const char diffPath []) {
-    if (!gm->validForPicture()) {
-        return true;
-    }
-
     SkPicture* pict = generate_new_picture(gm);
     SkAutoUnref aur(pict);
 
@@ -607,7 +603,10 @@
         SkBitmap forwardRenderedBitmap;
 
         for (size_t i = 0; i < SK_ARRAY_COUNT(gRec); i++) {
-            if ((kPDF_Backend == gRec[i].fBackend) && !doPDF) {
+            uint32_t gmFlags = gm->getFlags();
+
+            if ((kPDF_Backend == gRec[i].fBackend) && !doPDF ||
+                (gmFlags & GM::kSkipPDF_Flag)) {
                 continue;
             }
 
@@ -616,7 +615,7 @@
                          rt, &forwardRenderedBitmap);
             overallSuccess &= testSuccess;
 
-            if (doReplay && testSuccess) {
+            if (doReplay && testSuccess && !(gmFlags & GM::kSkipPicture_Flag)) {
                 testSuccess = test_picture_playback(gm, gRec[i],
                                       forwardRenderedBitmap,
                                       readPath, diffPath);