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

ImageBufferHaiku: adapt to new backends system #34

Merged
merged 1 commit into from
Aug 27, 2020

Conversation

alaviss
Copy link

@alaviss alaviss commented Aug 26, 2020

Introduced in aa9a420, this new system
abstracts away backend-specific details from platform-specific
implementations, allowing code reuse between platforms.

This commit adapts Haiku's ImageBufferBackend implementation to use this
new system.

A new method backendAlphaPremultiplication() is added for dealing with
BBitmap's sole support for unpremultiplied alpha. Interactions against
83cc46b remains to be seen as tests
requires WebGL2.

Testing with WebPositive shows more or less the same pass rate for
web-platform-tests/html/canvas/element/imagebitmap against the old code path.
No further tests has been done as DumpRenderTree couldn't run due to
a relocation error, making automated testing difficult.

@pulkomandy
Copy link
Member

pulkomandy commented Aug 26, 2020

How is the conversion between premultiplied alpha and B_RGB32 handled then? That's what most of the code you removed was doing (or trying to do, at least) since WebKit uses premultiplied alpha, but BBitmap doesn't handle it. Is it handled correctly by the cross-platform code?

Introduced in aa9a420, this new system
abstracts away backend-specific details from platform-specific
implementations, allowing code reuse between platforms.

This commit adapts Haiku's ImageBufferBackend implementation to use this
new system.

A new method `backendAlphaPremultiplication()` is added for dealing with
BBitmap's sole support for unpremultiplied alpha. Interactions against
83cc46b remains to be seen as tests
requires WebGL2.

Testing with WebPositive shows more or less the same pass rate for
web-platform-tests/html/canvas/element/imagebitmap against the old code path.
No further tests has been done as DumpRenderTree couldn't run due to
a relocation error, making automated testing difficult.
@alaviss
Copy link
Author

alaviss commented Aug 27, 2020

Is it handled correctly by the cross-platform code?

It does now :)

Copy link

@stippi2 stippi2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@pulkomandy pulkomandy merged commit 4d067de into haiku:rebased Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants