[PATCH 2/2] XCB: Remove a wrong optimization [v2]
Uli Schlachter
psychon at znc.in
Mon Nov 29 10:11:26 PST 2010
Clear surfaces with an alpha channel are already replaced with a transparent
color in gstate, so this code was never hit. For surfaces without an alpha
channel, this optimization is only correct if the surface pattern has an extend
other than CAIRO_EXTEND_NONE.
Also, this belongs into gstate and some other commit will have to make sure
gstate does this.
This fixes the clear-source test for xcb.
Signed-off-by: Uli Schlachter <psychon at znc.in>
Reviewed-by: Andrea Canciani <ranma42 at gmail.com>
---
src/cairo-xcb-surface-render.c | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c
index f90d6c8..6f29224 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -1156,13 +1156,6 @@ _cairo_xcb_surface_picture (cairo_xcb_surface_t *target,
cairo_filter_t filter;
cairo_status_t status;
- if (source->is_clear) {
- if (source->content & CAIRO_CONTENT_ALPHA)
- return _cairo_xcb_transparent_picture (target);
- else
- return _cairo_xcb_black_picture (target);
- }
-
{
cairo_xcb_surface_t *snapshot;
--
1.7.2.3
--------------050608020503020602080704--
More information about the cairo
mailing list