本文整理汇总了C++中SVGResourcesCache::removeResourcesFromRenderer方法的典型用法代码示例。如果您正苦于以下问题:C++ SVGResourcesCache::removeResourcesFromRenderer方法的具体用法?C++ SVGResourcesCache::removeResourcesFromRenderer怎么用?C++ SVGResourcesCache::removeResourcesFromRenderer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SVGResourcesCache
的用法示例。
在下文中一共展示了SVGResourcesCache::removeResourcesFromRenderer方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: clientDestroyed
void SVGResourcesCache::clientDestroyed(RenderElement& renderer)
{
SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(renderer);
if (resources)
resources->removeClientFromCache(renderer);
SVGResourcesCache* cache = resourcesCacheFromRenderObject(renderer);
cache->removeResourcesFromRenderer(renderer);
}
示例2: clientWillBeRemovedFromTree
void SVGResourcesCache::clientWillBeRemovedFromTree(RenderObject& renderer)
{
if (renderer.isAnonymous())
return;
RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer, false);
if (!rendererCanHaveResources(renderer))
return;
RenderElement& elementRenderer = toRenderElement(renderer);
SVGResourcesCache* cache = resourcesCacheFromRenderObject(elementRenderer);
cache->removeResourcesFromRenderer(elementRenderer);
}
示例3: resourceDestroyed
void SVGResourcesCache::resourceDestroyed(RenderSVGResourceContainer& resource)
{
SVGResourcesCache* cache = resourcesCacheFromRenderObject(resource);
// The resource itself may have clients, that need to be notified.
cache->removeResourcesFromRenderer(resource);
for (auto it = cache->m_cache.begin(), end = cache->m_cache.end(); it != end; ++it) {
it->value->resourceDestroyed(resource);
// Mark users of destroyed resources as pending resolution based on the id of the old resource.
Element& resourceElement = resource.element();
Element* clientElement = toElement(it->key->node());
SVGDocumentExtensions* extensions = clientElement->document().accessSVGExtensions();
extensions->addPendingResource(resourceElement.getIdAttribute(), clientElement);
}
}
示例4: clientStyleChanged
void SVGResourcesCache::clientStyleChanged(RenderElement& renderer, StyleDifference diff, const RenderStyle& newStyle)
{
if (diff == StyleDifferenceEqual || !renderer.parent())
return;
// In this case the proper SVGFE*Element will decide whether the modified CSS properties require a relayout or repaint.
if (renderer.isSVGResourceFilterPrimitive() && (diff == StyleDifferenceRepaint || diff == StyleDifferenceRepaintIfTextOrBorderOrOutline))
return;
// Dynamic changes of CSS properties like 'clip-path' may require us to recompute the associated resources for a renderer.
// FIXME: Avoid passing in a useless StyleDifference, but instead compare oldStyle/newStyle to see which resources changed
// to be able to selectively rebuild individual resources, instead of all of them.
if (rendererCanHaveResources(renderer)) {
SVGResourcesCache* cache = resourcesCacheFromRenderObject(renderer);
cache->removeResourcesFromRenderer(renderer);
cache->addResourcesFromRenderer(renderer, newStyle);
}
RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer, false);
if (renderer.element() && !renderer.element()->isSVGElement())
renderer.element()->setNeedsStyleRecalc(SyntheticStyleChange);
}