Summary: | DamageSubtract is misdesigned, making DeltaRectangles mode unusable | ||
---|---|---|---|
Product: | xorg | Reporter: | Nathaniel Smith <njs> |
Component: | Server/General | Assignee: | Keith Packard <keithp> |
Status: | RESOLVED MOVED | QA Contact: | Xorg Project Team <xorg-team> |
Severity: | normal | ||
Priority: | medium | CC: | keith.kriewall |
Version: | 7.3 (2007.09) | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | 2011BRB_Reviewed | ||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 44202 |
Description
Nathaniel Smith
2008-02-24 02:28:12 UTC
given a complete lack of activity, this is far too late for 7.5, even though it sounds useful to fix for 7.6. keithp? Yeah, my bad, real life intervened and I haven't had a chance to follow up properly (and that may be true for a while yet). In any case patch itself is pretty trivial, it's just the policy decision on what exactly it should do... I don't think this is a bug -- you should process all of the rectangles in a single operation (using a region). That's how this is supposed to work. (In reply to comment #3) > I don't think this is a bug -- you should process all of the rectangles in a > single operation (using a region). That's how this is supposed to work. Quoting the original report: "[Existing uses of DamageSubtract] fall into two classes: -- traditional cm's, which use NonEmpty and set repair=None, so they take branch A and B.3 is irrelevant. -- apps that want to keep track of what's on the screen (like xpra, and byzanz, and vino), which use DeltaRectangles and are bitten by this bug. " What you say is fine for the first class, but I don't see how it works for the second class. AFAIK, there *isn't* any "single operation" that lets you suck the contents of a region out of the X server (well, short of sucking down the whole bounding box). I have to handle the rectangles client-side, because unlike a traditional compositing manager, I'm not moving the rendered contents around inside the server -- I'm pulling out of the server and stuffing it down a network pipe. I can't stuff everything down the network pipe at the same time (at least, without degrading quality-of-service) because if I buffer too much then the screen contents may change before my copy of it even hits the wire, and latency will be reduced. It seems to me that this is exactly the sort of case that DamageReportDeltaRectangles is designed for, but this feature (which is itself apparently useless?) totally cripples DeltaRectangles mode. It might be that there's another way to solve such problems within the existing X server, but since AFAICT there isn't, re-opening. (If you *do* know of a solution, there are lots of programs that would benefit from you sharing your knowledge!) Too risky to change in 1.12 convergence. Moving to 1.13 tracker. (In reply to comment #4) > (In reply to comment #3) > > I don't think this is a bug -- you should process all of the rectangles in a > > single operation (using a region). That's how this is supposed to work. > > Quoting the original report: "[Existing uses of DamageSubtract] fall into two > classes: > -- traditional cm's, which use NonEmpty and set repair=None, so they take > branch A and B.3 is irrelevant. > -- apps that want to keep track of what's on the screen (like xpra, and > byzanz, and vino), which use DeltaRectangles and are bitten by this bug. > " > > What you say is fine for the first class, but I don't see how it works for the > second class. AFAIK, there *isn't* any "single operation" that lets you suck > the contents of a region out of the X server (well, short of sucking down the > whole bounding box). Is XFixesFetchRegion not this? I agree though, the re-notify behaviour is really bizarre, and I can imagine wanting to avoid it. For that matter I'm not sure why it's there in the first place. I'll see what I can do about this, I've got some other Damage changes I want to see anyway. (In reply to comment #6) > (In reply to comment #4) > > What you say is fine for the first class, but I don't see how it works for the > > second class. AFAIK, there *isn't* any "single operation" that lets you suck > > the contents of a region out of the X server (well, short of sucking down the > > whole bounding box). > > Is XFixesFetchRegion not this? XFixesFetchRegion lets us find out which rectangles on the screen are included in a region. What I'm talking about is copying the *contents* of those rectangles out into a client. Anyway, it doesn't really matter, because I only want to handle a bit of the screen at any one time anyway, so as to minimize latency... The use case here is things like tools for screen recording, screen casting, remote display, etc., which need to keep a client-side record of what's being shown on the screen. > I agree though, the re-notify behaviour is really bizarre, and I can imagine > wanting to avoid it. For that matter I'm not sure why it's there in the first > place. Yes, I can't think of any way to make use of it either. > I'll see what I can do about this, I've got some other Damage changes I want to > see anyway. That would be excellent! I don't think anyone would complain if you just diked it out entirely, but failing that, a DamageModeReportDeltaRectanglesFixed would work. (In reply to comment #7) > XFixesFetchRegion lets us find out which rectangles on the screen are included > in a region. What I'm talking about is copying the *contents* of those > rectangles out into a client. So that would be a XGetImage equivalent that takes a region instead of a rectangle, right? Right, that's what would be needed for such apps to "process all of the rectangles in a single operation". *** Bug 15347 has been marked as a duplicate of this bug. *** -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/361. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.