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

Support opaque rgba. #732

Closed
nical opened this issue Jan 17, 2017 · 3 comments
Closed

Support opaque rgba. #732

nical opened this issue Jan 17, 2017 · 3 comments

Comments

@nical
Copy link
Collaborator

@nical nical commented Jan 17, 2017

24 bits rgb is not very well supported by most opengl drivers and not supported at all in D3D. Gecko pretty much only uses 32 bit RGBA surfaces some of which being flagged as opaque and we need WebRender to handle the latter efficiently.
We should also uses this as an occasion to make the format names match the actual representation (for example RGBA should actually be BGRA, or maybe B8G8R8A8 to avoid confusion (for example it's not obvious whether RGB means 24 bits rgb or 32 bits rgb with the alpha channel ignored which is more commonly used).

@leeoniya
Copy link

@leeoniya leeoniya commented Jan 17, 2017

...or BGRA8, assuming they wouldn't vary per channel?

@nical
Copy link
Collaborator Author

@nical nical commented Jan 17, 2017

I have a preference towards sticking to the vulkan/DXGI convention (B8G8R8A8) which has no ambiguity and can describe all formats, including the ones where channels have different bit depths (we don't use them at the moment but might as well keep the door open). It's also the naming convention that Gecko uses so there's incentive to not have to jungle between several naming conventions.

@nical
Copy link
Collaborator Author

@nical nical commented Apr 21, 2017

ImageDescriptor now has an opaque boolean flag, which means we can use 32bpp image formats while keeping the opaque optimizations.

@nical nical closed this Apr 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.