auto merge of #4832 : Adenilson/servo/transparentBlack01, r=jdm

This patch set will implement a new helper function for transparent black, while changing the behavior of helper black() function returning opaque black by default.

It will also use the new Color equality operator to streamline the code in some points.
This commit is contained in:
bors-servo 2015-02-04 04:21:49 -07:00
commit e14c569ed0
4 changed files with 12 additions and 11 deletions

View file

@ -677,10 +677,8 @@ impl LayoutTask {
.to_gfx_color()
};
let black = color::black();
// TODO: Use equality operators when we sync with rust-azure.
if element_bg_color.r != black.r || element_bg_color.g != black.g ||
element_bg_color.b != black.b || element_bg_color.a != black.a {
let black = color::transparent_black();
if element_bg_color != black {
color = element_bg_color;
break;