Re: [patch] subsurface: fix memory leak

"Henry (Yu) Song - SISA" <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <3955FA337689574EB32F94B12A7E6E9E16357223@SISAEX01SJ.sisa.samsung.com>
Hi, Chris

Better idea to break cyclic referencing?

Thanks

Henry

-----Original Message-----
From: Chris Wilson [mailto:[email protected]] 
Sent: Thursday, June 14, 2012 1:50 PM
To: Henry (Yu) Song - SISA; [email protected]
Subject: Re: [cairo] [patch] subsurface: fix memory leak

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.