Add raw pixel serialization fallback for SkImages that cannot be encoded.

This fixes serialize-8888 for 2 GMs on Mac that I'm now unblacklisting.
I think another was already fixed, and two more were Windows-only.

Seems safe to use encoded_size=1 as another sentinel here (like we already
use =0); I can't imagine any encoded image format that can encode an image
in a single byte.

I suspect this is the root of the referenced bug too,
but this is a good idea even if not.

BUG=chromium:601851
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2039813007

CQ_EXTRA_TRYBOTS=client.skia:Test-Win-MSVC-GCE-CPU-AVX2-x86_64-Release-Trybot,Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-Trybot;client.skia.android:Test-Android-GCC-Nexus5-CPU-NEON-Arm7-Release-Trybot,Test-Android-GCC-Nexus9-CPU-Denver-Arm64-Release-Trybot

Review-Url: https://codereview.chromium.org/2039813007
diff --git a/tools/dm_flags.py b/tools/dm_flags.py
index baed46d..de81f2f 100755
--- a/tools/dm_flags.py
+++ b/tools/dm_flags.py
@@ -163,10 +163,7 @@
       blacklist.extend('_ gm _ composeshader_bitmap'.split(' '))
 
   # skia:4095
-  for test in ['not_native32_bitmap_config',
-               'bleed_image',
-               'bleed_alpha_image',
-               'bleed_alpha_image_shader',
+  for test in ['bleed_image',
                'c_gms',
                'colortype',
                'colortype_xfermodes',
@@ -175,10 +172,15 @@
                'fontmgr_bounds_1_-0.25',
                'fontmgr_bounds',
                'fontmgr_match',
-               'fontmgr_iter',
-               'verylargebitmap',              # Windows only.
-               'verylarge_picture_image']:     # Windows only.
+               'fontmgr_iter']:
     blacklist.extend(['serialize-8888', 'gm', '_', test])
+  if 'Mac' not in bot:
+    for test in ['bleed_alpha_image', 'bleed_alpha_image_shader']:
+      blacklist.extend(['serialize-8888', 'gm', '_', test])
+  if 'Win' in bot:
+    for test in ['verylargebitmap', 'verylarge_picture_image']:
+      blacklist.extend(['serialize-8888', 'gm', '_', test])
+
   # skia:4769
   for test in ['drawfilter']:
     blacklist.extend([    'sp-8888', 'gm', '_', test])
@@ -238,7 +240,7 @@
     match.extend(['~Once', '~Shared'])  # Not sure what's up with these tests.
 
   if 'TSAN' in bot:
-    match.extend(['~ReadWriteAlpha'])   # Flaky on TSAN-covered on nvidia bots. 
+    match.extend(['~ReadWriteAlpha'])   # Flaky on TSAN-covered on nvidia bots.
 
   if blacklist:
     args.append('--blacklist')