X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fcontext.cpp;h=12f464f9c5d541cf1ed25c9a842cdc58eb8002b7;hb=f70a8f98d0bff0e3ee57a27028a3f606956e9fd9;hp=d16c06ba7dca7e25749e91e96978cfde3f87ac1d;hpb=2dc2a206a800705cce91751de1ec3127c2ac2397;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/context.cpp b/synfig-core/trunk/src/synfig/context.cpp index d16c06b..12f464f 100644 --- a/synfig-core/trunk/src/synfig/context.cpp +++ b/synfig-core/trunk/src/synfig/context.cpp @@ -215,7 +215,7 @@ Context::accelerated_render(Surface *surface,int quality, const RendDesc &rendde // 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_blend_method() == Color::BLEND_STRAIGHT && composite->get_amount() == 1.0f && !composite->reads_context()) { @@ -264,7 +264,7 @@ Context::accelerated_render(Surface *surface,int quality, const RendDesc &rendde // using the appropriate 'amount' if (straight_and_empty) { - if (ret = Context((context+1)).accelerated_render(surface,quality,renddesc,cb)) + if ((ret = Context((context+1)).accelerated_render(surface,quality,renddesc,cb))) { Surface clearsurface; clearsurface.set_wh(renddesc.get_w(),renddesc.get_h()); @@ -272,7 +272,7 @@ Context::accelerated_render(Surface *surface,int quality, const RendDesc &rendde Surface::alpha_pen apen(surface->begin()); apen.set_alpha(composite->get_amount()); - apen.set_blend_method(Color::BLEND_STRAIGHT); + apen.set_blend_method(composite->get_blend_method()); clearsurface.blit_to(apen); } @@ -319,9 +319,13 @@ Context::set_time(Time time)const Context context(*this); while(!(context)->empty()) { - // If this layer is active, then go - // ahead and break out of the loop - if((*context)->active() && !(*context)->dirty_time_.is_equal(time)) + // If this layer is active, and + // it either isn't already set to the given time or + // it's a time loop layer, + // then break out of the loop and set its time + if((*context)->active() && + (!(*context)->dirty_time_.is_equal(time) || + (*context)->get_name() == "timeloop")) break; // Otherwise, we want to keep searching