mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-09 05:14:24 +00:00
24 lines
810 B
Diff
24 lines
810 B
Diff
--- ../../../../../cairo-cvs/dist/cairo-0.5.0/src/cairo.c 2005-05-11 19:59:13.000000000 -0700
|
|
+++ cairo/src/cairo.c 2005-06-01 23:09:11.000000000 -0700
|
|
@@ -1168,12 +1162,16 @@
|
|
if (cr->status)
|
|
return;
|
|
|
|
- _cairo_color_init_rgba (&color, 1., 1., 1., alpha);
|
|
- _cairo_pattern_init_solid (&pattern.solid, &color);
|
|
+ if (alpha == 1.0) {
|
|
+ cr->status = _cairo_gstate_paint (cr->gstate);
|
|
+ } else {
|
|
+ _cairo_color_init_rgba (&color, 1., 1., 1., alpha);
|
|
+ _cairo_pattern_init_solid (&pattern.solid, &color);
|
|
|
|
- cr->status = _cairo_gstate_mask (cr->gstate, &pattern.base);
|
|
+ cr->status = _cairo_gstate_mask (cr->gstate, &pattern.base);
|
|
|
|
- _cairo_pattern_fini (&pattern.base);
|
|
+ _cairo_pattern_fini (&pattern.base);
|
|
+ }
|
|
|
|
CAIRO_CHECK_SANITY (cr);
|
|
}
|