From 2147b77cbf12e45a2f956240bffbda9b45fb354c Mon Sep 17 00:00:00 2001 From: dooglus Date: Wed, 23 Jan 2008 14:44:03 +0000 Subject: [PATCH] Disabled an optimization that was being too enthusiastic. It's not always safe to skip rendering the context for straight blends with amount=1 - the blur layer for example outputs a blurred version of its context even when using the straight blend method. git-svn-id: http://svn.voria.com/code@1425 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/context.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/synfig-core/trunk/src/synfig/context.cpp b/synfig-core/trunk/src/synfig/context.cpp index 024b6d8..3bd36b7 100644 --- a/synfig-core/trunk/src/synfig/context.cpp +++ b/synfig-core/trunk/src/synfig/context.cpp @@ -211,15 +211,18 @@ Context::accelerated_render(Surface *surface,int quality, const RendDesc &rendde continue; } - // If this layer has Straight as the blend method and amount is 1.0 - // then we don't want to render the context - if (composite && composite->get_blend_method() == Color::BLEND_STRAIGHT && - composite->get_amount() == 1.0f) - { - Layer::Handle layer = *context; - while (!context->empty()) context++; // skip the context - return layer->accelerated_render(context,surface,quality,renddesc, cb); - } +// the following breaks the blur layer when used with the straight blend method +// in that case we do want to render the context, to know what to blur +// +// // If this layer has Straight as the blend method and amount is 1.0 +// // then we don't want to render the context +// if (composite && composite->get_blend_method() == Color::BLEND_STRAIGHT && +// composite->get_amount() == 1.0f) +// { +// Layer::Handle layer = *context; +// while (!context->empty()) context++; // skip the context +// return layer->accelerated_render(context,surface,quality,renddesc, cb); +// } // Break out of the loop--we have found a good layer break; -- 2.7.4