diff options
author | Cary Clark <caryclark@skia.org> | 2018-02-06 09:41:53 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-06 15:20:25 +0000 |
commit | 4855f78dd16ad50003ec537c98062e24a831cd45 (patch) | |
tree | 9566730a4f8416078131a0dc8255aecdeb9e3bf3 /tools/bookmaker/mdOut.cpp | |
parent | 2aa5bab573cff2d9bfb40f7af6014a93bf2d4fda (diff) |
fix bookmaker nightly
- mark the interfaces that use SkMask as deprecated
- add more autogenerated subtopics
- make subtopic names singular, avoiding collision with Skia names
- simplify #Deprecated and #Bug tags
- add "#Deprecated soon" to note things to be deprecated
- fix some spelling errors
- refresh web docs
- add self-check functionality to find methods outside subtopics
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=102150
Bug: skia:6898
Change-Id: I0e742a56d49dccd4409bb68eed9167c8ad7611ce
Reviewed-on: https://skia-review.googlesource.com/102150
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'tools/bookmaker/mdOut.cpp')
-rw-r--r-- | tools/bookmaker/mdOut.cpp | 61 |
1 files changed, 48 insertions, 13 deletions
diff --git a/tools/bookmaker/mdOut.cpp b/tools/bookmaker/mdOut.cpp index b51bb8d77e..7bc70af669 100644 --- a/tools/bookmaker/mdOut.cpp +++ b/tools/bookmaker/mdOut.cpp @@ -975,9 +975,6 @@ void MdOut::markTypeOut(Definition* def) { if (kSubtopics == name) { this->subtopicsOut(); } else { - SkASSERT(kClassesAndStructs == name || kConstants == name || kConstructors == name - || kMemberFunctions == name || kMembers == name || kOperators == name - || kRelatedFunctions == name); this->subtopicOut(this->populator(name.c_str())); } } break; @@ -1187,17 +1184,20 @@ void MdOut::mdHeaderOutLF(int depth, int lf) { void MdOut::populateTables(const Definition* def) { const Definition* csParent = this->csParent(); for (auto child : def->fChildren) { + if (string::npos != child->fName.find("Rect_Set")) { + SkDebugf(""); + } if (MarkType::kTopic == child->fMarkType || MarkType::kSubtopic == child->fMarkType) { bool legacyTopic = fPopulators.end() != fPopulators.find(child->fName); if (!legacyTopic && child->fName != kOverview) { - this->populator(kRelatedFunctions).push_back(child); + this->populator(kRelatedFunctions).fMembers.push_back(child); } this->populateTables(child); continue; } if (child->isStructOrClass()) { if (fClassStack.size() > 0) { - this->populator(kClassesAndStructs).push_back(child); + this->populator(kClassesAndStructs).fMembers.push_back(child); } fClassStack.push_back(child); this->populateTables(child); @@ -1205,11 +1205,11 @@ void MdOut::populateTables(const Definition* def) { continue; } if (MarkType::kEnum == child->fMarkType || MarkType::kEnumClass == child->fMarkType) { - this->populator(kConstants).push_back(child); + this->populator(kConstants).fMembers.push_back(child); continue; } if (MarkType::kMember == child->fMarkType) { - this->populator(kMembers).push_back(child); + this->populator(kMembers).fMembers.push_back(child); continue; } if (MarkType::kMethod != child->fMarkType) { @@ -1220,17 +1220,26 @@ void MdOut::populateTables(const Definition* def) { } if (Definition::MethodType::kConstructor == child->fMethodType || Definition::MethodType::kDestructor == child->fMethodType) { - this->populator(kConstructors).push_back(child); + this->populator(kConstructors).fMembers.push_back(child); continue; } if (Definition::MethodType::kOperator == child->fMethodType) { - this->populator(kOperators).push_back(child); + this->populator(kOperators).fMembers.push_back(child); continue; } - this->populator(kMemberFunctions).push_back(child); + this->populator(kMemberFunctions).fMembers.push_back(child); if (csParent && (0 == child->fName.find(csParent->fName + "::Make") || 0 == child->fName.find(csParent->fName + "::make"))) { - this->populator(kConstructors).push_back(child); + this->populator(kConstructors).fMembers.push_back(child); + continue; + } + for (auto item : child->fChildren) { + if (MarkType::kIn == item->fMarkType) { + string name(item->fContentStart, item->fContentEnd - item->fContentStart); + fPopulators[name].fMembers.push_back(child); + fPopulators[name].fShowClones = true; + break; + } } } } @@ -1331,7 +1340,7 @@ void MdOut::subtopicsOut() { this->rowOut("---", "---"); for (auto item : { kClassesAndStructs, kConstants, kConstructors, kMemberFunctions, kMembers, kOperators, kRelatedFunctions } ) { - for (auto entry : this->populator(item)) { + for (auto entry : this->populator(item).fMembers) { if (entry->csParent() == csParent) { string description = fPopulators.find(item)->second.fDescription; if (kConstructors == item) { @@ -1344,7 +1353,8 @@ void MdOut::subtopicsOut() { } } -void MdOut::subtopicOut(vector<const Definition*>& data) { +void MdOut::subtopicOut(const TableContents& tableContents) { + const auto& data = tableContents.fMembers; const Definition* csParent = this->csParent(); SkASSERT(csParent); fRoot = csParent->asRoot(); @@ -1360,6 +1370,9 @@ void MdOut::subtopicOut(vector<const Definition*>& data) { items[name] = entry; } for (auto entry : items) { + if (entry.second->fDeprecated) { + continue; + } const Definition* oneLiner = nullptr; for (auto child : entry.second->fChildren) { if (MarkType::kLine == child->fMarkType) { @@ -1367,8 +1380,30 @@ void MdOut::subtopicOut(vector<const Definition*>& data) { break; } } + if (!oneLiner) { + SkDebugf(""); + } SkASSERT(oneLiner); this->rowOut(entry.first.c_str(), string(oneLiner->fContentStart, oneLiner->fContentEnd - oneLiner->fContentStart)); + if (string::npos != entry.second->fName.find("SkRect::set")) { + SkDebugf(""); + } + if (tableContents.fShowClones && entry.second->fCloned) { + int cloneNo = 2; + string builder = entry.second->fName; + if ("()" == builder.substr(builder.length() - 2)) { + builder = builder.substr(0, builder.length() - 2); + } + builder += '_'; + do { + string match = builder + to_string(cloneNo); + auto child = csParent->findClone(match); + if (!child) { + break; + } + this->rowOut("", child->methodName()); + } while (++cloneNo); + } } } |