X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fcontext.cpp;h=d16c06ba7dca7e25749e91e96978cfde3f87ac1d;hb=2dc2a206a800705cce91751de1ec3127c2ac2397;hp=024b6d8b674ef6258a63120263a023381b820926;hpb=a50de53f5e4b23b1e3c0d79866a8503758422dba;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/context.cpp b/synfig-core/trunk/src/synfig/context.cpp index 024b6d8..d16c06b 100644 --- a/synfig-core/trunk/src/synfig/context.cpp +++ b/synfig-core/trunk/src/synfig/context.cpp @@ -202,7 +202,7 @@ Context::accelerated_render(Surface *surface,int quality, const RendDesc &rendde if(layer_bounds.area() <= 0.0000000000001 || !(layer_bounds && bbox)) { if (composite && - composite->get_blend_method() == Color::BLEND_STRAIGHT && + Color::is_straight(composite->get_blend_method()) && composite->get_amount() != 0.0f) { straight_and_empty = true; @@ -211,10 +211,13 @@ 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) + // If this layer has Straight as the blend method and amount + // is 1.0, and the layer doesn't depend on its context, then + // we don't want to render the context + if (composite && + Color::is_straight(composite->get_blend_method()) && + composite->get_amount() == 1.0f && + !composite->reads_context()) { Layer::Handle layer = *context; while (!context->empty()) context++; // skip the context