From: Henry Song Date: Thu, 23 Jul 2015 14:08:39 +0000 (+0530) Subject: Optimization when we know that surface is in transparent black. X-Git-Tag: submit/tizen/20151214.061957~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F02%2F45102%2F2;p=platform%2Fcore%2Fgraphics%2Fcairo.git Optimization when we know that surface is in transparent black. If the original surface has not been modified or is clear, we can avoid downloading data. Change-Id: If881bae9109a57f061a4e8d956c3eaf3c6691cf1 Signed-off-by: nisanthmp --- diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c index 665ab24..cf0f4e7 100644 --- a/src/cairo-gl-surface.c +++ b/src/cairo-gl-surface.c @@ -1583,11 +1583,11 @@ _cairo_gl_surface_map_to_image (void *abstract_surface, /* If the original surface has not been modified or * is clear, we can avoid downloading data. */ -/* if (surface->base.is_clear || surface->base.serial == 0) { + if (surface->base.is_clear || surface->base.serial == 0) { status = _cairo_gl_context_release (ctx, status); return image; } -*/ + /* This is inefficient, as we'd rather just read the thing without making * it the destination. But then, this is the fallback path, so let's not * fall back instead.