void RenderLayerModelObject::setBackingNeedsPaintInvalidationInRect(const LayoutRect& r, PaintInvalidationReason invalidationReason) const { // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here, // so assert but check that the layer is composited. ASSERT(compositingState() != NotComposited); // FIXME: generalize accessors to backing GraphicsLayers so that this code is squashing-agnostic. if (layer()->groupedMapping()) { LayoutRect paintInvalidationRect = r; if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashingLayer()) { // Note: the subpixel accumulation of layer() does not need to be added here. It is already taken into account. squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInvalidationRect), invalidationReason); } } else { layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, invalidationReason); } }
void RenderLayerModelObject::setBackingNeedsPaintInvalidationInRect(const LayoutRect& r, InvalidationReason invalidationReason) const { // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here, // so assert but check that the layer is composited. ASSERT(compositingState() != NotComposited); const char* reasonString = firstPaintInvalidationTrackingEnabled() ? invalidationReasonToString(invalidationReason) : ""; // FIXME: generalize accessors to backing GraphicsLayers so that this code is squashing-agnostic. if (layer()->groupedMapping()) { LayoutRect paintInvalidationRect = r; paintInvalidationRect.move(layer()->subpixelAccumulation()); if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashingLayer()) squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInvalidationRect), reasonString); } else { layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, reasonString); } }