Make node printing private
Summary: @public Removes `YGNodeGetPrintFunc`, and encapsulates node printing within `YGNode`. This is necessary for allowing for context-aware callback functions, which will ultimately allow for removal of weak global JNI references. On a side node, the printing logic does not seem to be well thought through: print functions print as a side effect to whatever output they choose. Printing that uses callbacks is printing to different output streams or strings, though. We need to consolidate Yoga debugging, and make it all more stringent. Reviewed By: SidharthGuglani Differential Revision: D14131024 fbshipit-source-id: 68704682dab3e7dfba61930bb03003d7d4723b80
This commit is contained in:
committed by
Facebook Github Bot
parent
bd90192df9
commit
59bcac3289
@@ -12,6 +12,12 @@
|
||||
using namespace facebook;
|
||||
using facebook::yoga::detail::CompactValue;
|
||||
|
||||
void YGNode::print() {
|
||||
if (print_ != nullptr) {
|
||||
print_(this);
|
||||
}
|
||||
}
|
||||
|
||||
YGFloatOptional YGNode::getLeadingPosition(
|
||||
const YGFlexDirection axis,
|
||||
const float axisSize) const {
|
||||
@@ -298,7 +304,7 @@ YGNode& YGNode::operator=(const YGNode& node) {
|
||||
}
|
||||
|
||||
context_ = node.getContext();
|
||||
print_ = node.getPrintFunc();
|
||||
print_ = node.print_;
|
||||
hasNewLayout_ = node.getHasNewLayout();
|
||||
nodeType_ = node.getNodeType();
|
||||
measureUsesContext_ = node.measureUsesContext_;
|
||||
|
Reference in New Issue
Block a user