Re: [patch] subsurface: fix memory leak
Chris Wilson <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <1339707013_22587@CP5-2952> |
On Thu, 14 Jun 2012 20:33:35 +0000, "Henry (Yu) Song - SISA" <[email protected]> wrote: > My question is why we need to set a subsurface is a snapshot of its target? Theoretically, it is correct. But no backends call _cairo_surface_subsurface_set_snapshot() except GL and XCB backends. in GL, we do need get snapshot of a subsurface. So this call is needed, but I don't see why we need to set the subsurface as its target's snapshot. No backends grab its snapshot when tries to extract the source pattern. Better ideas on preserving subsurface as snapshot of its target and break cyclic referencing? Attaching the snaphot of the subsurface to the target is in order to tie it into the modification notification. That is if you then render to the target (possibly via the subsurface), the snapshot is detached and no longer used as the source. That mechanism needs to be preserved if the functionality is to be kept. In the xlib backend, it is used to cache subsurfaces that require extraction from the parent surface as required to fixup extend modes. -Chris -- Chris Wilson, Intel Open Source Technology Centre -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo