本文整理汇总了C++中CoordinatedGraphicsLayer类的典型用法代码示例。如果您正苦于以下问题:C++ CoordinatedGraphicsLayer类的具体用法?C++ CoordinatedGraphicsLayer怎么用?C++ CoordinatedGraphicsLayer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CoordinatedGraphicsLayer类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: toCoordinatedGraphicsLayer
void ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea(ScrollableArea* scrollableArea)
{
CoordinatedGraphicsLayer* layer = toCoordinatedGraphicsLayer(scrollLayerForScrollableArea(scrollableArea));
if (!layer)
return;
layer->setScrollableArea(0);
}
示例2: CoordinatedGraphicsLayer
std::unique_ptr<GraphicsLayer> CompositingCoordinator::createGraphicsLayer(GraphicsLayerClient* client)
{
CoordinatedGraphicsLayer* layer = new CoordinatedGraphicsLayer(client);
layer->setCoordinator(this);
m_registeredLayers.add(layer->id(), layer);
m_state.layersToCreate.append(layer->id());
layer->setNeedsVisibleRectAdjustment();
notifyFlushRequired(layer);
return std::unique_ptr<GraphicsLayer>(layer);
}
示例3: LayerTreeHost
CoordinatedLayerTreeHost::CoordinatedLayerTreeHost(WebPage* webPage)
: LayerTreeHost(webPage)
, m_notifyAfterScheduledLayerFlush(false)
, m_isValid(true)
, m_isPurging(false)
, m_isFlushingLayerChanges(false)
, m_waitingForUIProcess(true)
, m_isSuspended(false)
, m_contentsScale(1)
, m_shouldSendScrollPositionUpdate(true)
, m_shouldSyncFrame(false)
, m_didInitializeRootCompositingLayer(false)
, m_layerFlushTimer(this, &CoordinatedLayerTreeHost::layerFlushTimerFired)
, m_releaseInactiveAtlasesTimer(this, &CoordinatedLayerTreeHost::releaseInactiveAtlasesTimerFired)
, m_layerFlushSchedulingEnabled(true)
, m_forceRepaintAsyncCallbackID(0)
, m_animationsLocked(false)
{
// Create a root layer.
m_rootLayer = GraphicsLayer::create(this, this);
CoordinatedGraphicsLayer* coordinatedRootLayer = toCoordinatedGraphicsLayer(m_rootLayer.get());
coordinatedRootLayer->setRootLayer(true);
#ifndef NDEBUG
m_rootLayer->setName("CoordinatedLayerTreeHost root layer");
#endif
m_rootLayer->setDrawsContent(false);
m_rootLayer->setSize(m_webPage->size());
m_layerTreeContext.coordinatedLayerID = toCoordinatedGraphicsLayer(coordinatedRootLayer)->id();
m_nonCompositedContentLayer = GraphicsLayer::create(this, this);
#ifndef NDEBUG
m_nonCompositedContentLayer->setName("CoordinatedLayerTreeHost non-composited content");
#endif
m_nonCompositedContentLayer->setDrawsContent(true);
m_nonCompositedContentLayer->setSize(m_webPage->size());
m_rootLayer->addChild(m_nonCompositedContentLayer.get());
if (m_webPage->hasPageOverlay())
createPageOverlayLayer();
scheduleLayerFlush();
}
示例4: toCoordinatedGraphicsLayer
void CoordinatedGraphicsLayer::setMaskLayer(GraphicsLayer* layer)
{
if (layer == maskLayer())
return;
GraphicsLayer::setMaskLayer(layer);
if (!layer)
return;
layer->setSize(size());
layer->setContentsVisible(contentsAreVisible());
CoordinatedGraphicsLayer* coordinatedLayer = toCoordinatedGraphicsLayer(layer);
coordinatedLayer->didChangeLayerState();
m_layerState.mask = coordinatedLayer->id();
m_layerState.maskChanged = true;
didChangeLayerState();
}
示例5: LayerTreeHost
LayerTreeCoordinator::LayerTreeCoordinator(WebPage* webPage)
: LayerTreeHost(webPage)
, m_notifyAfterScheduledLayerFlush(false)
, m_isValid(true)
, m_waitingForUIProcess(true)
, m_isSuspended(false)
, m_contentsScale(1)
, m_shouldSendScrollPositionUpdate(true)
, m_shouldSyncFrame(false)
, m_shouldSyncRootLayer(true)
, m_layerFlushTimer(this, &LayerTreeCoordinator::layerFlushTimerFired)
, m_layerFlushSchedulingEnabled(true)
, m_forceRepaintAsyncCallbackID(0)
{
// Create a root layer.
m_rootLayer = GraphicsLayer::create(this);
CoordinatedGraphicsLayer* webRootLayer = toCoordinatedGraphicsLayer(m_rootLayer.get());
webRootLayer->setRootLayer(true);
#ifndef NDEBUG
m_rootLayer->setName("LayerTreeCoordinator root layer");
#endif
m_rootLayer->setDrawsContent(false);
m_rootLayer->setSize(m_webPage->size());
m_layerTreeContext.webLayerID = toCoordinatedGraphicsLayer(webRootLayer)->id();
m_nonCompositedContentLayer = GraphicsLayer::create(this);
toCoordinatedGraphicsLayer(m_rootLayer.get())->setCoordinatedGraphicsLayerClient(this);
#ifndef NDEBUG
m_nonCompositedContentLayer->setName("LayerTreeCoordinator non-composited content");
#endif
m_nonCompositedContentLayer->setDrawsContent(true);
m_nonCompositedContentLayer->setSize(m_webPage->size());
m_rootLayer->addChild(m_nonCompositedContentLayer.get());
if (m_webPage->hasPageOverlay())
createPageOverlayLayer();
scheduleLayerFlush();
}
示例6: updateOffsetFromViewportForSelf
static void updateOffsetFromViewportForSelf(RenderLayer* renderLayer)
{
// These conditions must match the conditions in RenderLayerCompositor::requiresCompositingForPosition.
RenderLayerBacking* backing = renderLayer->backing();
if (!backing)
return;
RenderStyle* style = renderLayer->renderer()->style();
if (!style)
return;
if (!renderLayer->renderer()->isOutOfFlowPositioned() || renderLayer->renderer()->style()->position() != FixedPosition)
return;
if (!renderLayer->renderer()->container()->isRenderView())
return;
if (!renderLayer->isStackingContext())
return;
CoordinatedGraphicsLayer* graphicsLayer = toCoordinatedGraphicsLayer(backing->graphicsLayer());
graphicsLayer->setFixedToViewport(true);
}