本文整理汇总了C++中FrameMetrics::GetDoSmoothScroll方法的典型用法代码示例。如果您正苦于以下问题:C++ FrameMetrics::GetDoSmoothScroll方法的具体用法?C++ FrameMetrics::GetDoSmoothScroll怎么用?C++ FrameMetrics::GetDoSmoothScroll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrameMetrics
的用法示例。
在下文中一共展示了FrameMetrics::GetDoSmoothScroll方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AppendToString
void
AppendToString(std::stringstream& aStream, const FrameMetrics& m,
const char* pfx, const char* sfx, bool detailed)
{
aStream << pfx;
AppendToString(aStream, m.GetCompositionBounds(), "{ [cb=");
AppendToString(aStream, m.GetScrollableRect(), "] [sr=");
AppendToString(aStream, m.GetScrollOffset(), "] [s=");
if (m.GetDoSmoothScroll()) {
AppendToString(aStream, m.GetSmoothScrollOffset(), "] [ss=");
}
AppendToString(aStream, m.GetDisplayPort(), "] [dp=");
AppendToString(aStream, m.GetCriticalDisplayPort(), "] [cdp=");
if (!detailed) {
AppendToString(aStream, m.GetScrollId(), "] [scrollId=");
if (m.IsRootContent()) {
aStream << "] [rcd";
}
AppendToString(aStream, m.GetZoom(), "] [z=", "] }");
} else {
AppendToString(aStream, m.GetDisplayPortMargins(), " [dpm=");
aStream << nsPrintfCString("] um=%d", m.GetUseDisplayPortMargins()).get();
AppendToString(aStream, m.GetRootCompositionSize(), "] [rcs=");
AppendToString(aStream, m.GetViewport(), "] [v=");
aStream << nsPrintfCString("] [z=(ld=%.3f r=%.3f",
m.GetDevPixelsPerCSSPixel().scale,
m.GetPresShellResolution()).get();
AppendToString(aStream, m.GetCumulativeResolution(), " cr=");
AppendToString(aStream, m.GetZoom(), " z=");
AppendToString(aStream, m.GetExtraResolution(), " er=");
aStream << nsPrintfCString(")] [u=(%d %d %" PRIu32 ")",
m.GetScrollUpdateType(), m.GetDoSmoothScroll(),
m.GetScrollGeneration()).get();
aStream << nsPrintfCString("] [i=(%" PRIu32 " %" PRIu64 " %d)] }",
m.GetPresShellId(), m.GetScrollId(), m.IsRootContent()).get();
}
aStream << sfx;
}