本文整理汇总了C++中PaintLayer::containsDirtyOverlayScrollbars方法的典型用法代码示例。如果您正苦于以下问题:C++ PaintLayer::containsDirtyOverlayScrollbars方法的具体用法?C++ PaintLayer::containsDirtyOverlayScrollbars怎么用?C++ PaintLayer::containsDirtyOverlayScrollbars使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PaintLayer
的用法示例。
在下文中一共展示了PaintLayer::containsDirtyOverlayScrollbars方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: paintContents
void FramePainter::paintContents(GraphicsContext& context, const GlobalPaintFlags globalPaintFlags, const IntRect& rect)
{
Document* document = frameView().frame().document();
#ifndef NDEBUG
bool fillWithRed;
if (document->printing())
fillWithRed = false; // Printing, don't fill with red (can't remember why).
else if (frameView().frame().owner())
fillWithRed = false; // Subframe, don't fill with red.
else if (frameView().isTransparent())
fillWithRed = false; // Transparent, don't fill with red.
else if (globalPaintFlags & GlobalPaintSelectionOnly)
fillWithRed = false; // Selections are transparent, don't fill with red.
else
fillWithRed = true;
if (fillWithRed && !LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(context, *frameView().layoutView(), DisplayItem::DebugRedFill, LayoutPoint())) {
IntRect contentRect(IntPoint(), frameView().contentsSize());
LayoutObjectDrawingRecorder drawingRecorder(context, *frameView().layoutView(), DisplayItem::DebugRedFill, contentRect, LayoutPoint());
}
#endif
LayoutView* layoutView = frameView().layoutView();
if (!layoutView) {
WTF_LOG_ERROR("called FramePainter::paint with nil layoutObject");
return;
}
if (!frameView().shouldThrottleRendering()) {
RELEASE_ASSERT(!frameView().needsLayout());
ASSERT(document->lifecycle().state() >= DocumentLifecycle::CompositingClean);
}
TRACE_EVENT1("devtools.timeline", "Paint", "data", InspectorPaintEvent::data(layoutView, LayoutRect(rect), 0));
bool isTopLevelPainter = !s_inPaintContents;
s_inPaintContents = true;
FontCachePurgePreventer fontCachePurgePreventer;
// TODO(jchaffraix): GlobalPaintFlags should be const during a paint
// phase. Thus we should set this flag upfront (crbug.com/510280).
GlobalPaintFlags localPaintFlags = globalPaintFlags;
if (document->printing())
localPaintFlags |= GlobalPaintFlattenCompositingLayers | GlobalPaintPrinting;
PaintLayer* rootLayer = layoutView->layer();
#if ENABLE(ASSERT)
if (!frameView().shouldThrottleRendering())
layoutView->assertSubtreeIsLaidOut();
LayoutObject::SetLayoutNeededForbiddenScope forbidSetNeedsLayout(*rootLayer->layoutObject());
#endif
PaintLayerPainter layerPainter(*rootLayer);
float deviceScaleFactor = blink::deviceScaleFactor(rootLayer->layoutObject()->frame());
context.setDeviceScaleFactor(deviceScaleFactor);
layerPainter.paint(context, LayoutRect(rect), localPaintFlags);
if (rootLayer->containsDirtyOverlayScrollbars())
layerPainter.paintOverlayScrollbars(context, LayoutRect(rect), localPaintFlags);
// Regions may have changed as a result of the visibility/z-index of element changing.
if (document->annotatedRegionsDirty())
frameView().updateDocumentAnnotatedRegions();
if (isTopLevelPainter) {
// Everything that happens after paintContents completions is considered
// to be part of the next frame.
memoryCache()->updateFramePaintTimestamp();
s_inPaintContents = false;
}
InspectorInstrumentation::didPaint(layoutView, 0, context, LayoutRect(rect));
}