Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

32-bit visuals and transparent windows #279

Closed
totaam opened this issue Mar 5, 2013 · 15 comments
Closed

32-bit visuals and transparent windows #279

totaam opened this issue Mar 5, 2013 · 15 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Mar 5, 2013

Issue migrated from trac ticket # 279

component: core | priority: minor | resolution: fixed

2013-03-05 10:00:49: antoine created the issue


Needed for things like #77 (see there for backing patch)

We need to:

  • add client caps (ie: "transparency"?)
  • detect when the window uses 32-bit visuals
  • make sure we use a 32-bit corral window (if client supports it and window uses 32-bit visuals)
  • pass the window depth to clients that support it
  • client windows should be created as 32-bit rgba windows if needed
  • return 32-bit pixel data as needed from get_rgb_rawdata, and the depth used so callers know about it
  • switch to encoders that support transparency (as some won't support it)
  • store transparency with the encoding (png should handle it ok, we should add a rgb32 mode, x264?, vpx?)

Extra difficulty:

  • pixbuf.get_from_drawable does not seem to handle things properly.. maybe we can use gdk_pixbuf_get_from_image instead?
  • security: we don't want to have a remote transparent window capable of stealing all input
@totaam
Copy link
Collaborator Author

totaam commented Mar 5, 2013

2013-03-05 10:01:42: antoine changed status from new to assigned

@totaam
Copy link
Collaborator Author

totaam commented Mar 5, 2013

2013-03-05 10:01:42: antoine edited the issue description

@totaam
Copy link
Collaborator Author

totaam commented Mar 5, 2013

2013-03-05 10:03:38: antoine uploaded file transparency.patch (7.7 KiB)

adds basics for supporting transparency

@totaam
Copy link
Collaborator Author

totaam commented Mar 5, 2013

2013-03-05 10:04:33: antoine edited the issue description

@totaam
Copy link
Collaborator Author

totaam commented May 7, 2013

2013-05-07 09:41:22: antoine commented


The biggest stumbling block is going to be the X11 server once again.

Neither Xvfb nor the dummy driver support 32-bit visuals, for whatever reason.
See this ticket for Xvfb.

I've tried to patch dummy to allow it but only got as far as this:

[128046.305] (II) DUMMY: Driver for Dummy chipsets: dummy
[128046.305] (WW) Falling back to old probe method for dummy
[128046.305] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[128046.305] (II) DUMMY(0): Chipset is a DUMMY
[128046.305] (II) DUMMY(0): Creating default Display subsection in Screen section
	"dummy_screen" for depth/fbbpp 32/32
[128046.305] (**) DUMMY(0): Depth 32, (--) framebuffer bpp 32
[128046.305] (EE) DUMMY(0): Weight given (000) is inconsistent with the depth (32)

Patch attached. Note: module loading is complicated and I hacked the ABI number rather than trying to figure out why the srpm did not install out of the box.

@totaam
Copy link
Collaborator Author

totaam commented May 7, 2013

2013-05-07 09:42:34: antoine uploaded file dummy-32bits.patch (1.2 KiB)

naive hack to try to get 32-bit modes with dummy driver (not working)

@totaam
Copy link
Collaborator Author

totaam commented May 12, 2013

2013-05-12 13:37:49: totaam commented


Ignore comment:4, no changes to the X11 server were needed.
What we want are 32-bit visuals, you can get that from a 24-bit dummy server just fine.

r3368 now handles transparency (big changeset - lost of details in commit message)

Remaining work items:

  • verify pixel parsing on a big-endian server (and client?)
  • verify transparency handling (X11 transparency is pre-multiplied?)
  • test transparent system tray forwarding
  • servers without PIL should fallback to gtk pixbuf code
  • make it work with webp which is better (smaller/faster) than png and does transparency
  • change encoding availability detection: can vary depending on client or server, client type, window backing type, etc..
  • choose appropriate client window class based on alpha (no GL for now..)
  • handle alpha channel with GL client window

@totaam
Copy link
Collaborator Author

totaam commented Jul 16, 2013

2013-07-16 06:49:10: antoine changed status from assigned to closed

@totaam
Copy link
Collaborator Author

totaam commented Jul 16, 2013

2013-07-16 06:49:10: antoine changed resolution from ** to fixed

@totaam
Copy link
Collaborator Author

totaam commented Jul 16, 2013

2013-07-16 06:49:10: antoine commented


Pretty much all done, see:

That will do for now, win32 may get transparency if/when we move to gtk3/qt4 (#90).

@totaam totaam closed this as completed Jul 16, 2013
@totaam
Copy link
Collaborator Author

totaam commented Aug 12, 2013

2013-08-12 11:32:23: totaam commented


Note: X11 pixel data is in pre-multiplied format, so we needed r4152 to display it properly with GTK (#416 to improve on that). I don't think it really matters to the encoders (only png and webp at present) if it's pre-multiplied or not.

@totaam
Copy link
Collaborator Author

totaam commented Oct 22, 2013

2013-10-22 14:02:44: onlyjob commented


Since lack of transparency support should not be a problem any more why black rectangle still an issue with Firefox and expanding tree-style-tab?
Antoine, remember in https://www.xpra.org/trac/ticket/252#comment:24 you confirmed that you are able to reproduce the problem.
It never improved and as before the issue is only reproducible in active window... Any ideas why it still happening? Thanks.

@totaam
Copy link
Collaborator Author

totaam commented Jan 24, 2014

2014-01-24 13:14:30: norman commented


Should xeyes's transparently work correctly with this? Is there an example that does?

@totaam
Copy link
Collaborator Author

totaam commented Jan 24, 2014

2014-01-24 13:18:52: norman commented


xeyes uses the SHAPE extension, not transparency, so it's probably not expected to work :-)

@totaam
Copy link
Collaborator Author

totaam commented May 19, 2014

2014-05-19 13:06:30: totaam commented


(set correct milestone work was completed in)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant