aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--docs/SkBitmap_Reference.bmh6
-rw-r--r--docs/SkPath_Reference.bmh4
-rw-r--r--docs/SkRect_Reference.bmh8
-rw-r--r--site/user/api/SkBitmap_Reference.md6
-rw-r--r--site/user/api/SkImage_Reference.md16
-rw-r--r--site/user/api/SkPath_Reference.md4
-rw-r--r--site/user/api/SkRect_Reference.md8
-rw-r--r--tools/bookmaker/bookmaker.cpp7
-rw-r--r--tools/bookmaker/bookmaker.h11
-rw-r--r--tools/bookmaker/definition.cpp3
-rw-r--r--tools/bookmaker/includeWriter.cpp109
-rw-r--r--tools/bookmaker/mdOut.cpp9
-rw-r--r--tools/bookmaker/spellCheck.cpp3
13 files changed, 119 insertions, 75 deletions
diff --git a/docs/SkBitmap_Reference.bmh b/docs/SkBitmap_Reference.bmh
index 6ecaddabe1..a11330a6ce 100644
--- a/docs/SkBitmap_Reference.bmh
+++ b/docs/SkBitmap_Reference.bmh
@@ -109,8 +109,8 @@ or setPixelRef was called.
};
##
-Subclass of Allocator that returns a Pixel_Ref that allocates its pixel
-memory from the heap. This is the default Allocator invoked by
+Subclass of SkBitmap::Allocator that returns a Pixel_Ref that allocates its pixel
+memory from the heap. This is the default SkBitmap::Allocator invoked by
allocPixels.
# ------------------------------------------------------------------------------
@@ -142,7 +142,7 @@ pixel address = 0x560ddd0ac670
##
##
-#SeeAlso Allocator tryAllocPixels
+#SeeAlso SkBitmap::Allocator tryAllocPixels
##
diff --git a/docs/SkPath_Reference.bmh b/docs/SkPath_Reference.bmh
index 8659e055ea..a0166802cd 100644
--- a/docs/SkPath_Reference.bmh
+++ b/docs/SkPath_Reference.bmh
@@ -5781,7 +5781,7 @@ Verb_Array, Point_Array, and Conic_Weight are returned unaltered.
#Method RawIter()
Initializes RawIter with an empty Path. next() on RawIter returns kDone_Verb.
- Call setPath to initialize Iter at a later time.
+ Call setPath to initialize SkPath::Iter at a later time.
#Return RawIter of empty Path ##
@@ -5804,7 +5804,7 @@ Verb_Array, Point_Array, and Conic_Weight are returned unaltered.
#Method void setPath(const SkPath& path)
- Sets Iter to return elements of Verb_Array, Point_Array, and Conic_Weight in path.
+ Sets SkPath::Iter to return elements of Verb_Array, Point_Array, and Conic_Weight in path.
#Param path Path to iterate ##
diff --git a/docs/SkRect_Reference.bmh b/docs/SkRect_Reference.bmh
index a363de2497..2a8275c74f 100644
--- a/docs/SkRect_Reference.bmh
+++ b/docs/SkRect_Reference.bmh
@@ -1919,7 +1919,7 @@ round: 31, 51, 41, 61
#In Rounding
#Line # sets members to nearest integer value away from opposite ##
Sets IRect by discarding the fractional portion of fLeft and fTop; and
-rounding up fRight and FBottom, using
+rounding up fRight and fBottom, using
#Formula
(SkScalarFloorToInt(fLeft), SkScalarFloorToInt(fTop),
SkScalarCeilToInt(fRight), SkScalarCeilToInt(fBottom))
@@ -1948,7 +1948,7 @@ round: 30, 50, 41, 61
#In Rounding
Sets Rect by discarding the fractional portion of fLeft and fTop; and
-rounding up fRight and FBottom, using
+rounding up fRight and fBottom, using
#Formula
(SkScalarFloorToInt(fLeft), SkScalarFloorToInt(fTop),
SkScalarCeilToInt(fRight), SkScalarCeilToInt(fBottom))
@@ -1978,7 +1978,7 @@ round: 30, 50, 41, 61
#In Rounding
#Line # sets members to nearest integer value towards opposite ##
Sets Rect by rounding up fLeft and fTop; and
-discarding the fractional portion of fRight and FBottom, using
+discarding the fractional portion of fRight and fBottom, using
#Formula
(SkScalarCeilToInt(fLeft), SkScalarCeilToInt(fTop),
@@ -2036,7 +2036,7 @@ round: 31, 51, 41, 61
#In Rounding
Sets IRect by discarding the fractional portion of fLeft and fTop; and
-rounding up fRight and FBottom, using
+rounding up fRight and fBottom, using
#Formula
(SkScalarFloorToInt(fLeft), SkScalarFloorToInt(fTop),
SkScalarCeilToInt(fRight), SkScalarCeilToInt(fBottom))
diff --git a/site/user/api/SkBitmap_Reference.md b/site/user/api/SkBitmap_Reference.md
index f53ecaacc9..66637f282e 100644
--- a/site/user/api/SkBitmap_Reference.md
+++ b/site/user/api/SkBitmap_Reference.md
@@ -206,8 +206,8 @@ public:
bool <a href="#SkBitmap_HeapAllocator_allocPixelRef">allocPixelRef(SkBitmap* bitmap)</a> override;
};</pre>
-Subclass of <a href="#SkBitmap_Allocator">Allocator</a> that returns a <a href="undocumented#Pixel_Ref">Pixel Ref</a> that allocates its pixel
-memory from the heap. This is the default <a href="#SkBitmap_Allocator">Allocator</a> invoked by
+Subclass of <a href="#SkBitmap_Allocator">SkBitmap::Allocator</a> that returns a <a href="undocumented#Pixel_Ref">Pixel Ref</a> that allocates its pixel
+memory from the heap. This is the default <a href="#SkBitmap_Allocator">SkBitmap::Allocator</a> invoked by
<a href="#SkBitmap_allocPixels">allocPixels</a>.
<a name="SkBitmap_HeapAllocator_allocPixelRef"></a>
@@ -248,7 +248,7 @@ pixel address = 0x560ddd0ac670
### See Also
-<a href="#SkBitmap_Allocator">Allocator</a> <a href="#SkBitmap_tryAllocPixels">tryAllocPixels</a><sup><a href="#SkBitmap_tryAllocPixels_2">[2]</a></sup><sup><a href="#SkBitmap_tryAllocPixels_3">[3]</a></sup><sup><a href="#SkBitmap_tryAllocPixels_4">[4]</a></sup>
+<a href="#SkBitmap_Allocator">SkBitmap::Allocator</a> <a href="#SkBitmap_tryAllocPixels">tryAllocPixels</a><sup><a href="#SkBitmap_tryAllocPixels_2">[2]</a></sup><sup><a href="#SkBitmap_tryAllocPixels_3">[3]</a></sup><sup><a href="#SkBitmap_tryAllocPixels_4">[4]</a></sup>
---
diff --git a/site/user/api/SkImage_Reference.md b/site/user/api/SkImage_Reference.md
index d3f665435c..b564fc5c96 100644
--- a/site/user/api/SkImage_Reference.md
+++ b/site/user/api/SkImage_Reference.md
@@ -735,8 +735,8 @@ zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has
<table> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_context"> <code><strong>context </strong></code> </a></td> <td>
<a href="undocumented#GPU_Context">GPU Context</a></td>
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_yuvColorSpace"> <code><strong>yuvColorSpace </strong></code> </a></td> <td>
-one of: <a href="undocumented#YUV_ColorSpace">kJPEG SkYUVColorSpace</a>, <a href="undocumented#YUV_ColorSpace">kRec601 SkYUVColorSpace</a>,
-<a href="undocumented#YUV_ColorSpace">kRec709 SkYUVColorSpace</a></td>
+one of: <a href="SkImageInfo_Reference#SkYUVColorSpace">kJPEG SkYUVColorSpace</a>, <a href="SkImageInfo_Reference#SkYUVColorSpace">kRec601 SkYUVColorSpace</a>,
+<a href="SkImageInfo_Reference#SkYUVColorSpace">kRec709 SkYUVColorSpace</a></td>
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_yuvTextureHandles"> <code><strong>yuvTextureHandles </strong></code> </a></td> <td>
array of YUV textures on GPU</td>
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_yuvSizes"> <code><strong>yuvSizes </strong></code> </a></td> <td>
@@ -779,8 +779,8 @@ zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has
<table> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_2_context"> <code><strong>context </strong></code> </a></td> <td>
<a href="undocumented#GPU_Context">GPU Context</a></td>
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_2_yuvColorSpace"> <code><strong>yuvColorSpace </strong></code> </a></td> <td>
-one of: <a href="undocumented#YUV_ColorSpace">kJPEG SkYUVColorSpace</a>, <a href="undocumented#YUV_ColorSpace">kRec601 SkYUVColorSpace</a>,
-<a href="undocumented#YUV_ColorSpace">kRec709 SkYUVColorSpace</a></td>
+one of: <a href="SkImageInfo_Reference#SkYUVColorSpace">kJPEG SkYUVColorSpace</a>, <a href="SkImageInfo_Reference#SkYUVColorSpace">kRec601 SkYUVColorSpace</a>,
+<a href="SkImageInfo_Reference#SkYUVColorSpace">kRec709 SkYUVColorSpace</a></td>
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_2_yuvTextureHandles"> <code><strong>yuvTextureHandles </strong></code> </a></td> <td>
array of YUV textures on GPU</td>
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_2_yuvSizes"> <code><strong>yuvSizes </strong></code> </a></td> <td>
@@ -826,8 +826,8 @@ zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has
<table> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_context"> <code><strong>context </strong></code> </a></td> <td>
<a href="undocumented#GPU_Context">GPU Context</a></td>
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_yuvColorSpace"> <code><strong>yuvColorSpace </strong></code> </a></td> <td>
-one of: <a href="undocumented#YUV_ColorSpace">kJPEG SkYUVColorSpace</a>, <a href="undocumented#YUV_ColorSpace">kRec601 SkYUVColorSpace</a>,
-<a href="undocumented#YUV_ColorSpace">kRec709 SkYUVColorSpace</a></td>
+one of: <a href="SkImageInfo_Reference#SkYUVColorSpace">kJPEG SkYUVColorSpace</a>, <a href="SkImageInfo_Reference#SkYUVColorSpace">kRec601 SkYUVColorSpace</a>,
+<a href="SkImageInfo_Reference#SkYUVColorSpace">kRec709 SkYUVColorSpace</a></td>
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_nv12TextureHandles"> <code><strong>nv12TextureHandles </strong></code> </a></td> <td>
array of YUV textures on GPU</td>
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_nv12Sizes"> <code><strong>nv12Sizes </strong></code> </a></td> <td>
@@ -872,8 +872,8 @@ zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has
<table> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_2_context"> <code><strong>context </strong></code> </a></td> <td>
<a href="undocumented#GPU_Context">GPU Context</a></td>
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_2_yuvColorSpace"> <code><strong>yuvColorSpace </strong></code> </a></td> <td>
-one of: <a href="undocumented#YUV_ColorSpace">kJPEG SkYUVColorSpace</a>, <a href="undocumented#YUV_ColorSpace">kRec601 SkYUVColorSpace</a>,
-<a href="undocumented#YUV_ColorSpace">kRec709 SkYUVColorSpace</a></td>
+one of: <a href="SkImageInfo_Reference#SkYUVColorSpace">kJPEG SkYUVColorSpace</a>, <a href="SkImageInfo_Reference#SkYUVColorSpace">kRec601 SkYUVColorSpace</a>,
+<a href="SkImageInfo_Reference#SkYUVColorSpace">kRec709 SkYUVColorSpace</a></td>
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_2_nv12TextureHandles"> <code><strong>nv12TextureHandles </strong></code> </a></td> <td>
array of YUV textures on GPU</td>
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_2_nv12Sizes"> <code><strong>nv12Sizes </strong></code> </a></td> <td>
diff --git a/site/user/api/SkPath_Reference.md b/site/user/api/SkPath_Reference.md
index 9de370b4d1..2859e50839 100644
--- a/site/user/api/SkPath_Reference.md
+++ b/site/user/api/SkPath_Reference.md
@@ -5095,7 +5095,7 @@ RawIter()
</pre>
Initializes <a href="#SkPath_RawIter_RawIter">RawIter</a> with an empty <a href="#Path">Path</a>. <a href="#SkPath_RawIter_next">next</a> on <a href="#SkPath_RawIter_RawIter">RawIter</a> returns <a href="#SkPath_kDone_Verb">kDone Verb</a>.
-Call <a href="#SkPath_RawIter_setPath">setPath</a> to initialize <a href="#SkPath_Iter">Iter</a> at a later time.
+Call <a href="#SkPath_RawIter_setPath">setPath</a> to initialize <a href="#SkPath_Iter">SkPath::Iter</a> at a later time.
### Return Value
@@ -5131,7 +5131,7 @@ Sets <a href="#SkPath_RawIter_RawIter">RawIter</a> to return elements of <a href
void setPath(const SkPath& path)
</pre>
-Sets <a href="#SkPath_Iter">Iter</a> to return elements of <a href="#Verb_Array">Verb Array</a>, <a href="#Point_Array">Point Array</a>, and <a href="#Conic_Weight">Conic Weight</a> in <a href="#SkPath_RawIter_setPath_path">path</a>.
+Sets <a href="#SkPath_Iter">SkPath::Iter</a> to return elements of <a href="#Verb_Array">Verb Array</a>, <a href="#Point_Array">Point Array</a>, and <a href="#Conic_Weight">Conic Weight</a> in <a href="#SkPath_RawIter_setPath_path">path</a>.
### Parameters
diff --git a/site/user/api/SkRect_Reference.md b/site/user/api/SkRect_Reference.md
index 61cb9a2cc8..86c86a7136 100644
--- a/site/user/api/SkRect_Reference.md
+++ b/site/user/api/SkRect_Reference.md
@@ -2518,7 +2518,7 @@ void roundOut(SkIRect* dst) const
</pre>
Sets <a href="SkIRect_Reference#IRect">IRect</a> by discarding the fractional portion of <a href="#SkRect_fLeft">fLeft</a> and <a href="#SkRect_fTop">fTop</a>; and
-rounding up <a href="#SkRect_fRight">fRight</a> and FBottom, using(.
+rounding up <a href="#SkRect_fRight">fRight</a> and <a href="#SkRect_fBottom">fBottom</a>, using(.
### Parameters
@@ -2552,7 +2552,7 @@ void roundOut(SkRect* dst) const
</pre>
Sets <a href="#Rect">Rect</a> by discarding the fractional portion of <a href="#SkRect_fLeft">fLeft</a> and <a href="#SkRect_fTop">fTop</a>; and
-rounding up <a href="#SkRect_fRight">fRight</a> and FBottom, using(.
+rounding up <a href="#SkRect_fRight">fRight</a> and <a href="#SkRect_fBottom">fBottom</a>, using(.
### Parameters
@@ -2587,7 +2587,7 @@ void roundIn(SkIRect* dst) const
</pre>
Sets <a href="#Rect">Rect</a> by rounding up <a href="#SkRect_fLeft">fLeft</a> and <a href="#SkRect_fTop">fTop</a>; and
-discarding the fractional portion of <a href="#SkRect_fRight">fRight</a> and FBottom, using(.
+discarding the fractional portion of <a href="#SkRect_fRight">fRight</a> and <a href="#SkRect_fBottom">fBottom</a>, using(.
### Parameters
@@ -2652,7 +2652,7 @@ SkIRect roundOut() const
</pre>
Sets <a href="SkIRect_Reference#IRect">IRect</a> by discarding the fractional portion of <a href="#SkRect_fLeft">fLeft</a> and <a href="#SkRect_fTop">fTop</a>; and
-rounding up <a href="#SkRect_fRight">fRight</a> and FBottom, using(.
+rounding up <a href="#SkRect_fRight">fRight</a> and <a href="#SkRect_fBottom">fBottom</a>, using(.
### Return Value
diff --git a/tools/bookmaker/bookmaker.cpp b/tools/bookmaker/bookmaker.cpp
index 9d5a2782f3..6f7c698ca5 100644
--- a/tools/bookmaker/bookmaker.cpp
+++ b/tools/bookmaker/bookmaker.cpp
@@ -981,9 +981,6 @@ void HackParser::topicIter(const Definition* topic) {
}
switch (child->fMarkType) {
case MarkType::kMethod: {
- if (Definition::MethodType::kOperator == child->fMethodType) {
- SkDebugf("");
- }
hasIn |= MarkType::kTopic != topic->fMarkType &&
MarkType::kSubtopic != topic->fMarkType; // don't write #In if parent is class
hasLine |= child->fClone;
@@ -1008,10 +1005,6 @@ void HackParser::topicIter(const Definition* topic) {
}
}
if ("" == oneLiner) {
- const Definition* csParent = child->csParent();
- if (!csParent || !csParent->csParent()) {
- SkDebugf("");
- }
#ifdef SK_DEBUG
const Definition* rootParent = topic;
while (rootParent->fParent && MarkType::kClass != rootParent->fMarkType
diff --git a/tools/bookmaker/bookmaker.h b/tools/bookmaker/bookmaker.h
index 0264f50ac9..6bd4e1e5fa 100644
--- a/tools/bookmaker/bookmaker.h
+++ b/tools/bookmaker/bookmaker.h
@@ -902,6 +902,17 @@ public:
void setWrapper();
+ const Definition* topicParent() const {
+ Definition* test = fParent;
+ while (test) {
+ if (MarkType::kTopic == test->fMarkType) {
+ return test;
+ }
+ test = test->fParent;
+ }
+ return nullptr;
+ }
+
string fText; // if text is constructed instead of in a file, it's put here
const char* fStart = nullptr; // .. in original text file, or the start of fText
const char* fContentStart; // start past optional markup name
diff --git a/tools/bookmaker/definition.cpp b/tools/bookmaker/definition.cpp
index 25d154386d..68e001aebb 100644
--- a/tools/bookmaker/definition.cpp
+++ b/tools/bookmaker/definition.cpp
@@ -1285,9 +1285,6 @@ static string unpreformat(const string& orig) {
}
bool Definition::paramsMatch(const string& matchFormatted, const string& name) const {
- if (string::npos != matchFormatted.find("readPixels")) {
- SkDebugf("");
- }
string match = unpreformat(matchFormatted);
TextParser def(fFileName, fStart, fContentStart, fLineCount);
const char* dName = def.strnstr(name.c_str(), fContentStart);
diff --git a/tools/bookmaker/includeWriter.cpp b/tools/bookmaker/includeWriter.cpp
index dd5df8f75f..716194066c 100644
--- a/tools/bookmaker/includeWriter.cpp
+++ b/tools/bookmaker/includeWriter.cpp
@@ -640,6 +640,9 @@ void IncludeWriter::enumSizeItems(const Definition& child) {
// walk children and output complete method doxygen description
void IncludeWriter::methodOut(const Definition* method, const Definition& child) {
+ if (string::npos != method->fName.find("scalePixels")) {
+ SkDebugf("");
+ }
if (fPendingMethod) {
fIndent -= 4;
fPendingMethod = false;
@@ -705,6 +708,7 @@ void IncludeWriter::methodOut(const Definition* method, const Definition& child)
this->writeCommentTrailer();
fBmhMethod = nullptr;
fMethodDef = nullptr;
+ fEnumDef = nullptr;
fWroteMethod = true;
}
@@ -1317,19 +1321,14 @@ bool IncludeWriter::populate(Definition* def, ParentPair* prevPair, RootDefiniti
}
}
// FIXME: trigger error earlier if inner #Struct or #Class is missing #Code
- const char* commentStart;
- const char* commentEnd;
if (!fBmhStructDef->fDeprecated) {
SkASSERT(codeBlock);
SkASSERT(nextBlock); // FIXME: check enum for correct order earlier
- commentStart = codeBlock->fTerminator;
- commentEnd = nextBlock->fStart;
- }
- if (fIndentNext) {
-// fIndent += 4;
+ const char* commentStart = codeBlock->fTerminator;
+ const char* commentEnd = nextBlock->fStart;
+ fIndentNext = true;
+ this->structOut(root, *fBmhStructDef, commentStart, commentEnd);
}
- fIndentNext = true;
- this->structOut(root, *fBmhStructDef, commentStart, commentEnd);
}
fDeferComment = nullptr;
} else {
@@ -1488,9 +1487,7 @@ bool IncludeWriter::populate(Definition* def, ParentPair* prevPair, RootDefiniti
}
}
SkASSERT(fBmhStructDef);
- if (fBmhStructDef->fDeprecated) {
- SkDebugf("");
- } else {
+ if (!fBmhStructDef->fDeprecated) {
memberEnd = this->structMemberOut(memberStart, child);
startDef = &child;
fStart = child.fContentEnd + 1;
@@ -1676,6 +1673,7 @@ string IncludeWriter::resolveRef(const char* start, const char* end, bool first,
*refType = RefType::kNormal;
SkASSERT(string::npos == undername.find(' '));
const Definition* rootDef = nullptr;
+ string substitute;
{
auto rootDefIter = fBmhParser->fTopicMap.find(undername);
if (fBmhParser->fTopicMap.end() != rootDefIter) {
@@ -1691,10 +1689,18 @@ string IncludeWriter::resolveRef(const char* start, const char* end, bool first,
if (fBmhParser->fTopicMap.end() != rootDefIter) {
rootDef = rootDefIter->second;
}
- } else {
+ if (!rootDef) {
+ size_t doubleColon = fBmhStructDef->fName.rfind("::");
+ if (string::npos != doubleColon && undername
+ == fBmhStructDef->fName.substr(doubleColon + 2)) {
+ substitute = fBmhStructDef->fName;
+ }
+ }
+ }
+ if (!rootDef && !substitute.length()) {
auto aliasIter = fBmhParser->fAliasMap.find(undername);
if (fBmhParser->fAliasMap.end() != aliasIter) {
- rootDef = aliasIter->second->fParent;
+ rootDef = aliasIter->second;
} else if (!first) {
SkDebugf("unfound: %s\n", undername.c_str());
this->reportError("reference unfound");
@@ -1703,33 +1709,71 @@ string IncludeWriter::resolveRef(const char* start, const char* end, bool first,
}
}
}
- string substitute;
if (rootDef) {
- for (auto child : rootDef->fChildren) {
- if (MarkType::kSubstitute == child->fMarkType) {
- substitute = string(child->fContentStart,
- (int) (child->fContentEnd - child->fContentStart));
- break;
+ MarkType rootType = rootDef->fMarkType;
+ bool isTopic = MarkType::kSubtopic == rootType || MarkType::kTopic == rootType;
+ auto substituteParent = MarkType::kAlias == rootType ? rootDef->fParent :
+ isTopic ? rootDef : nullptr;
+ if (substituteParent) {
+ for (auto child : substituteParent->fChildren) {
+ if (MarkType::kSubstitute == child->fMarkType) {
+ substitute = string(child->fContentStart,
+ (int) (child->fContentEnd - child->fContentStart));
+ break;
+ }
+ }
+ }
+ if (!substitute.length()) {
+ string match = rootDef->fName;
+ size_t index;
+ while (string::npos != (index = match.find('_'))) {
+ match.erase(index, 1);
+ }
+ string skmatch = "Sk" + match;
+ auto parent = substituteParent ? substituteParent : rootDef;
+ for (auto child : parent->fChildren) {
+ // there may be more than one
+ // prefer the one mostly closely matching in text
+ if ((MarkType::kClass == child->fMarkType ||
+ MarkType::kStruct == child->fMarkType ||
+ (MarkType::kEnum == child->fMarkType && !child->fAnonymous) ||
+ MarkType::kEnumClass == child->fMarkType) && (match == child->fName ||
+ skmatch == child->fName)) {
+ substitute = child->fName;
+ break;
+ }
}
}
if (!substitute.length()) {
for (auto child : rootDef->fChildren) {
+ // there may be more than one
+ // if so, it's a bug since it's unknown which is the right one
if (MarkType::kClass == child->fMarkType ||
MarkType::kStruct == child->fMarkType ||
(MarkType::kEnum == child->fMarkType && !child->fAnonymous) ||
MarkType::kEnumClass == child->fMarkType) {
+ SkASSERT("" == substitute);
substitute = child->fName;
- if (MarkType::kEnum == child->fMarkType && fInEnum) {
+ if (MarkType::kEnum == child->fMarkType) {
size_t parentClassEnd = substitute.find("::");
SkASSERT(string::npos != parentClassEnd);
- substitute = substitute.substr(parentClassEnd + 2);
+ string subEnd = substitute.substr(parentClassEnd + 2);
+ if (fInEnum) {
+ substitute = subEnd;
+ }
+ if (subEnd == undername) {
+ break;
+ }
}
- break;
}
}
}
if (!substitute.length()) {
- auto parent = rootDef->fParent;
+ const Definition* parent = rootDef;
+ do {
+ parent = parent->fParent;
+ } while (parent && (MarkType::kSubtopic == parent->fMarkType
+ || MarkType::kTopic == parent->fMarkType));
if (parent) {
if (MarkType::kClass == parent->fMarkType ||
MarkType::kStruct == parent->fMarkType ||
@@ -1738,9 +1782,14 @@ string IncludeWriter::resolveRef(const char* start, const char* end, bool first,
if (parent->fParent != fRootTopic) {
substitute = parent->fName;
size_t under = undername.find('_');
- SkASSERT(string::npos != under);
- string secondHalf(&undername[under], (size_t) (undername.length() - under));
- substitute += ConvertRef(secondHalf, false);
+ if (string::npos != under) {
+ string secondHalf(&undername[under],
+ (size_t) (undername.length() - under));
+ substitute += ConvertRef(secondHalf, false);
+ } else {
+ substitute += ' ';
+ substitute += ConvertRef(undername, false);
+ }
} else {
substitute += ConvertRef(undername, first);
}
@@ -1752,6 +1801,9 @@ string IncludeWriter::resolveRef(const char* start, const char* end, bool first,
if (first && isupper(start[0]) && substitute.length() > 0 && islower(substitute[0])) {
substitute[0] = start[0];
}
+ if (undername == "Color_Type" && substitute == "") {
+ SkDebugf("");
+ }
return substitute;
}
@@ -1807,6 +1859,9 @@ int IncludeWriter::lookupReference(const PunctuationState punctuation, const Wor
temp = ConvertRef(resolved, false);
}
}
+ if (resolved == "Color_Type" && temp == "color type") {
+ SkDebugf("");
+ }
if (temp.length()) {
if (start > lastWrite) {
SkASSERT(data[start - 1] >= ' ');
diff --git a/tools/bookmaker/mdOut.cpp b/tools/bookmaker/mdOut.cpp
index 31f8ef4f6f..77a370e156 100644
--- a/tools/bookmaker/mdOut.cpp
+++ b/tools/bookmaker/mdOut.cpp
@@ -973,9 +973,6 @@ void MdOut::markTypeOut(Definition* def) {
case MarkType::kPopulate: {
SkASSERT(MarkType::kSubtopic == def->fParent->fMarkType);
string name = def->fParent->fName;
- if ("Bitmap_Related_Function" == def->fParent->fFiddle) {
- SkDebugf("");
- }
if (kSubtopics == name) {
this->subtopicsOut();
} else {
@@ -1191,9 +1188,6 @@ void MdOut::populateTables(const Definition* def) {
return;
}
for (auto child : def->fChildren) {
- if (string::npos != child->fFiddle.find("Bitmap_Set")) {
- SkDebugf("");
- }
if (MarkType::kTopic == child->fMarkType || MarkType::kSubtopic == child->fMarkType) {
string name = child->fName;
bool builtInTopic = name == kClassesAndStructs || name == kConstants
@@ -1381,9 +1375,6 @@ void MdOut::subtopicOut(const TableContents& tableContents) {
items[name] = entry;
}
for (auto entry : items) {
- if (string::npos != entry.second->fName.find("SkRect::set")) {
- SkDebugf("");
- }
if (entry.second->fDeprecated) {
continue;
}
diff --git a/tools/bookmaker/spellCheck.cpp b/tools/bookmaker/spellCheck.cpp
index bafc969ef4..3cb62be3ef 100644
--- a/tools/bookmaker/spellCheck.cpp
+++ b/tools/bookmaker/spellCheck.cpp
@@ -644,9 +644,6 @@ void SpellCheck::wordCheck(const string& str) {
if (mappy.end() != iter) {
iter->second.fCount += 1;
} else {
- if ("offscreen" == str) {
- SkDebugf("");
- }
CheckEntry* entry = &mappy[str];
entry->fFile = fFileName;
entry->fLine = fLineCount + fLocalLine;