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

Color channels are incorrect under skia on Linux #245

Closed
brson opened this issue Jan 8, 2013 · 6 comments
Closed

Color channels are incorrect under skia on Linux #245

brson opened this issue Jan 8, 2013 · 6 comments

Comments

@brson
Copy link
Contributor

@brson brson commented Jan 8, 2013

Perhaps red and blue are swapped.

@xspager
Copy link

@xspager xspager commented Apr 8, 2013

Hope this helps...

http://www.chromium.org/developers/design-documents/graphics-and-skia#TOC-The-epic-battle-of-RGBA-and-BGRA

diff --git a/src/servo-gfx/color.rs b/src/servo-gfx/color.rs
index 274b30a..a9d981e 100644
--- a/src/servo-gfx/color.rs
+++ b/src/servo-gfx/color.rs
@@ -11,7 +11,7 @@ pub fn rgb(r: u8, g: u8, b: u8) -> AzColor {
rgba(r, g, b, 1.0)
}

-pub fn rgba(r: u8, g: u8, b: u8, a: float) -> AzColor {
+pub fn rgba(b: u8, g: u8, r: u8, a: float) -> AzColor {
AzColor {
r: (r as AzFloat) / (255.0 as AzFloat),
g: (g as AzFloat) / (255.0 as AzFloat),

Screenshot from 2013-04-08 18:36:18

@metajack
Copy link
Contributor

@metajack metajack commented Apr 15, 2013

This should be fixed by latest skia and rust-azure. I haven't updated servo's submodules since I still need to test on Linux.

It would be great if you could confirm that fixes the issue for you.

@xspager
Copy link

@xspager xspager commented Apr 15, 2013

Still the same blue page.

Just cheking what i did:
cd build
make clean
git pull
cd ../src/rust-azure/
cd -
../configure --disable-manage-submodules
make -j3
Screenshot from 2013-04-15 19:18:36

@metajack
Copy link
Contributor

@metajack metajack commented Apr 15, 2013

It appears you left out skia. You have to update both (and after you rebuild skia you will need to rebuild rust-azure).

@xspager
Copy link

@xspager xspager commented Apr 16, 2013

Fixed!

Screenshot from 2013-04-15 21:17:28

@metajack
Copy link
Contributor

@metajack metajack commented Apr 16, 2013

Great!

@metajack metajack closed this Apr 16, 2013
ChrisParis pushed a commit to ChrisParis/servo that referenced this issue Sep 7, 2014
Add a test for empty names in HTMLCollection in DOM.
glennw pushed a commit to glennw/servo that referenced this issue Jan 16, 2017
Update nightly Rust version to keep in sync with Servo.

Rustup happened in servo#10076
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.

3 participants
You can’t perform that action at this time.