update canvas doc, primarily readpixels and writepixels

also fixed minor bookmaker bugs so canvas 
include and online docs are (bookmaker detected)
error-free

TBR=reed@google.com
Docs-Preview: https://skia.org/?cl=37840
Bug: skia:
Change-Id: Ifcec9c751105444047c37d89fd984dbd4dfd1913
Reviewed-on: https://skia-review.googlesource.com/37840
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
diff --git a/tools/bookmaker/bookmaker.cpp b/tools/bookmaker/bookmaker.cpp
index 939519e..cbb34a2 100644
--- a/tools/bookmaker/bookmaker.cpp
+++ b/tools/bookmaker/bookmaker.cpp
@@ -430,17 +430,24 @@
                 }
             } else if (!incEof && '#' == inc.peek() && (defEof || '#' != def.peek())) {
                 inc.next();
-                SkASSERT(inc.startsWith("if"));
-                inc.skipToEndBracket("#");
-                SkASSERT(inc.startsWith("#endif"));
-                inc.skipToEndBracket("\n");
+                if (inc.startsWith("if")) {
+                    inc.skipToEndBracket("\n");
+                } else if (inc.startsWith("endif")) {
+                    inc.skipToEndBracket("\n");
+                } else {
+                    SkASSERT(0); // incomplete
+                    return false;
+                }
             } else {
                 break;
             }
             inc.next();
         } while (true);
         if (defEof || incEof) {
-            return defEof == incEof || (!defEof && ';' == def.peek());
+            if (defEof == incEof || (!defEof && ';' == def.peek())) {
+                return true;
+            }
+            return false;  // allow setting breakpoint on failure
         }
         char defCh;
         do {
@@ -1960,7 +1967,7 @@
 
 DEFINE_string2(bmh, b, "", "A path to a *.bmh file or a directory.");
 DEFINE_string2(examples, e, "", "File of fiddlecli input, usually fiddle.json (For now, disables -r -f -s)");
-DEFINE_string2(fiddle, f, "fiddleout.json", "File of fiddlecli output.");
+DEFINE_string2(fiddle, f, "", "File of fiddlecli output, usually fiddleout.json.");
 DEFINE_string2(include, i, "", "A path to a *.h file or a directory.");
 DEFINE_bool2(hack, k, false, "Do a find/replace hack to update all *.bmh files. (Requires -b)");
 DEFINE_bool2(populate, p, false, "Populate include from bmh. (Requires -b -i)");
diff --git a/tools/bookmaker/includeParser.cpp b/tools/bookmaker/includeParser.cpp
index 826c321..6aed937 100644
--- a/tools/bookmaker/includeParser.cpp
+++ b/tools/bookmaker/includeParser.cpp
@@ -315,6 +315,7 @@
                 } break;
                 case MarkType::kComment:
                     break;
+                case MarkType::kEnumClass:
                 case MarkType::kEnum: {
                     if (!def) {
                         // work backwards from first word to deduce #Enum name
@@ -366,7 +367,9 @@
                        SkDebugf("enum differs from bmh: %s\n", def->fName.c_str());
                     }
                     for (auto& child : token.fChildren) {
-                        string constName = className + "::" + child->fName;
+                        string constName = MarkType::kEnumClass == token.fMarkType ?
+                                fullName : className;
+                        constName += "::" + child->fName;
                         def = root->find(constName);
                         if (!def) {
                             string innerName = classMapper.first + "::" + child->fName;