static inline void invalidateResourcesOfChildren(RenderElement& renderer) { ASSERT(!renderer.needsLayout()); if (auto* resources = SVGResourcesCache::cachedResourcesForRenderer(renderer)) resources->removeClientFromCache(renderer, false); for (auto& child : childrenOfType<RenderElement>(renderer)) invalidateResourcesOfChildren(child); }
void SVGRenderingContext::renderSubtreeToImageBuffer(ImageBuffer* image, RenderElement& item, const AffineTransform& subtreeContentTransformation) { ASSERT(image); // Rendering into a buffer implies we're being used for masking, clipping, patterns or filters. In each of these // cases we don't want to paint the selection. PaintInfo info(image->context(), LayoutRect::infiniteRect(), PaintPhaseForeground, PaintBehaviorSkipSelectionHighlight); AffineTransform& contentTransformation = currentContentTransformation(); AffineTransform savedContentTransformation = contentTransformation; contentTransformation = subtreeContentTransformation * contentTransformation; ASSERT(!item.needsLayout()); item.paint(info, IntPoint()); contentTransformation = savedContentTransformation; }