update bookmaker
change https://skia-review.googlesource.com/c/skia/+/91380
should have triggered a bookmaker failure but, while
it reported the error it did not return that the check
failed. See
https://chromium-swarm.appspot.com/task?id=3adfe04df6f9ce10&refresh=10
Update bookmaker to detect and return error
also, add some SkImage examples
fixed some linefeeds
TBR=bsalomon@google.com
Docs-Preview: https://skia.org/?cl=90883
Bug: skia:6898
Change-Id: I3530c8d81785b71568f6229c2aad3259dded59d7
Reviewed-on: https://skia-review.googlesource.com/90883
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
diff --git a/tools/bookmaker/bookmaker.h b/tools/bookmaker/bookmaker.h
index 792f7d9..c839278 100644
--- a/tools/bookmaker/bookmaker.h
+++ b/tools/bookmaker/bookmaker.h
@@ -935,7 +935,7 @@
RootDefinition* asRoot() override { return this; }
const RootDefinition* asRoot() const override { return this; }
void clearVisited();
- bool dumpUnVisited(bool skip);
+ bool dumpUnVisited();
const Definition* find(const string& ref, AllowParens ) const;
bool isRoot() const override { return true; }
RootDefinition* rootParent() override { return fRootParent; }
diff --git a/tools/bookmaker/definition.cpp b/tools/bookmaker/definition.cpp
index 77f4446..82b0a33 100644
--- a/tools/bookmaker/definition.cpp
+++ b/tools/bookmaker/definition.cpp
@@ -1215,18 +1215,10 @@
}
}
-bool RootDefinition::dumpUnVisited(bool skip) {
- bool allStructElementsFound = true;
+bool RootDefinition::dumpUnVisited() {
+ bool success = true;
for (auto& leaf : fLeaves) {
if (!leaf.second.fVisited) {
- // TODO: parse embedded struct in includeParser phase, then remove this condition
- if (skip) {
- const Definition& def = leaf.second;
- if (def.fChildren.size() > 0 &&
- MarkType::kDeprecated == def.fChildren[0]->fMarkType) {
- continue;
- }
- }
// FIXME: bugs requiring long tail fixes, suppressed here:
// SkBitmap::validate() is wrapped in SkDEBUGCODE in .h and not parsed
if ("SkBitmap::validate()" == leaf.first) {
@@ -1238,12 +1230,13 @@
}
// FIXME: end of long tail bugs
SkDebugf("defined in bmh but missing in include: %s\n", leaf.first.c_str());
+ success = false;
}
}
for (auto& branch : fBranches) {
- allStructElementsFound &= branch.second->dumpUnVisited(skip);
+ success &= branch.second->dumpUnVisited();
}
- return allStructElementsFound;
+ return success;
}
const Definition* RootDefinition::find(const string& ref, AllowParens allowParens) const {
diff --git a/tools/bookmaker/includeParser.cpp b/tools/bookmaker/includeParser.cpp
index fa5ad32..26281b6 100644
--- a/tools/bookmaker/includeParser.cpp
+++ b/tools/bookmaker/includeParser.cpp
@@ -458,8 +458,7 @@
continue;
}
RootDefinition* root = &finder->second;
- if (!root->dumpUnVisited(bmhParser.fSkip)) {
- SkDebugf("some struct elements not found; struct finding in includeParser is missing\n");
+ if (!root->dumpUnVisited()) {
fFailed = true;
}
if (crossChecks) {