Re: [PATCH xserver 1/3] res: Simplify QueryClientPixmapBytes
Adam Jacksonwrites: > I suspect this code predates the common resource hooks for computing > sizes. It's ugly in any case since the Resource extension shouldn't > need to know which extensions can take a reference on pixmaps. Instead, > let's just walk every resource for the client and sum up all the pixmap > bytes that way. This will miss pixmaps which are not referenced by the resource db, including all redirect pixmaps. -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 1/3] res: Simplify QueryClientPixmapBytes
Adam Jacksonwrites: > I don't really understand your objection about pixmaps not in the > resdb, because ResQueryClientPixmapBytes is _already_ not accounting > for those, and it's not clear to me how it even could. Sorry, that code has gotten a lot more sophisticated since I wrote it... Looks like it didn't get updated to take full advantage of the "recent" (2010) changes. -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 1/3] res: Simplify QueryClientPixmapBytes
On Wed, 2016-02-03 at 21:34 +1100, Keith Packard wrote: > Adam Jacksonwrites: > > > I suspect this code predates the common resource hooks for computing > > sizes. It's ugly in any case since the Resource extension shouldn't > > need to know which extensions can take a reference on pixmaps. Instead, > > let's just walk every resource for the client and sum up all the pixmap > > bytes that way. > > This will miss pixmaps which are not referenced by the resource db, > including all redirect pixmaps. ResFindResourcePixmaps will call the size function for every type; for windows that's GetWindowBytes, which does account for background and border pixmaps, likewise the GC size func accounts for tiles and stipples. This code does remove the accounting for redirect pixmaps, which is intentional, because that code is wrong. The commit message for 2/3 covers this, and introduces correct accounting by wrapping GetWindowBytes. And 3/3 cleans up the case of a GLXPixmap holding the only reference to a pixmap. I don't really understand your objection about pixmaps not in the resdb, because ResQueryClientPixmapBytes is _already_ not accounting for those, and it's not clear to me how it even could. - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel