diff options
author | Henry Song <henry.song@samsung.com> | 2015-07-23 19:38:39 +0530 |
---|---|---|
committer | nisanthmp <nisanth.mp@samsung.com> | 2015-08-03 18:48:33 +0530 |
commit | 85d32b74e6eb43b0aa43f8635fce34ff83ef63a1 (patch) | |
tree | c9419b2ff1c00c2993de90c9041f89d1079abe12 | |
parent | 6553e8bbfb0afcc558a0e4bb2147159c0971d9db (diff) | |
download | cairo-85d32b74e6eb43b0aa43f8635fce34ff83ef63a1.tar.gz cairo-85d32b74e6eb43b0aa43f8635fce34ff83ef63a1.tar.bz2 cairo-85d32b74e6eb43b0aa43f8635fce34ff83ef63a1.zip |
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 <nisanth.mp@samsung.com>
-rw-r--r-- | src/cairo-gl-surface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c index 665ab244a..cf0f4e75d 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. |