Add Fiddle DrawOptions for the backend objects

Change-Id: I720125f134394a8b923d6e883941d20715945d73
Reviewed-on: https://skia-review.googlesource.com/73340
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/tools/fiddle/fiddle_main.h b/tools/fiddle/fiddle_main.h
index 97fa071..5492a42 100644
--- a/tools/fiddle/fiddle_main.h
+++ b/tools/fiddle/fiddle_main.h
@@ -31,7 +31,13 @@
 extern double frame;    // A value in [0, 1] of where we are in the animation.
 
 struct DrawOptions {
-    DrawOptions(int w, int h, bool r, bool g, bool p, bool k, bool srgb, bool f16, bool textOnly, const char* s)
+    DrawOptions(int w, int h, bool r, bool g, bool p, bool k, bool srgb, bool f16,
+                bool textOnly, const char* s,
+                GrMipMapped mipMapping,
+                int offScreenWidth,
+                int offScreenHeight,
+                int offScreenSampleCount,
+                GrMipMapped offScreenMipMapping)
         : size(SkISize::Make(w, h))
         , raster(r)
         , gpu(g)
@@ -41,7 +47,11 @@
         , f16(f16)
         , textOnly(textOnly)
         , source(s)
-    {
+        , fMipMapping(mipMapping)
+        , fOffScreenWidth(offScreenWidth)
+        , fOffScreenHeight(offScreenHeight)
+        , fOffScreenSampleCount(offScreenSampleCount)
+        , fOffScreenMipMapping(offScreenMipMapping) {
         // F16 mode is only valid for color correct backends.
         SkASSERT(srgb || !f16);
     }
@@ -54,6 +64,20 @@
     bool f16;
     bool textOnly;
     const char* source;
+
+    // This flag is used when a GPU texture resource is created and exposed as a GrBackendTexture.
+    // In this case the resource is created with extra room to accomodate mipmaps.
+    // TODO: The SkImage::makeTextureImage API would need to be widened to allow this to be true
+    // for the non-backend gpu SkImages.
+    GrMipMapped fMipMapping;
+
+    // Parameters for an GPU offscreen resource exposed as a GrBackendRenderTarget
+    int         fOffScreenWidth;
+    int         fOffScreenHeight;
+    int         fOffScreenSampleCount;
+    // TODO: should we also expose stencilBits here? How about the config?
+
+    GrMipMapped fOffScreenMipMapping; // only applicable if the offscreen is also textureable
 };
 
 extern DrawOptions GetDrawOptions();