From: dooglus Date: Fri, 16 Nov 2007 03:26:51 +0000 (+0000) Subject: Fix clipping for tile-based rendering. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=42163e9d717ab6ac2cdda7f8e07c050c75f6861c;p=synfig.git Fix clipping for tile-based rendering. git-svn-id: http://svn.voria.com/code@1155 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/modules/lyr_std/sphere_distort.cpp b/synfig-core/trunk/src/modules/lyr_std/sphere_distort.cpp index 40ee9c7..732dd6f 100644 --- a/synfig-core/trunk/src/modules/lyr_std/sphere_distort.cpp +++ b/synfig-core/trunk/src/modules/lyr_std/sphere_distort.cpp @@ -350,7 +350,14 @@ bool Layer_SphereDistort::accelerated_render(Context context,Surface *surface,in (type == TYPE_DISTV && (sphr.miny >= windr.maxy || windr.miny >= sphr.maxy)) ) { //synfig::warning("Spherize: Bounding box reject"); - return context.accelerated_render(surface,quality,renddesc,cb); + if (clip) + { + surface->set_wh(renddesc.get_w(), renddesc.get_h()); + surface->clear(); + return true; + } + else + return context.accelerated_render(surface,quality,renddesc,cb); } //synfig::warning("Spherize: Bounding box accept"); @@ -548,6 +555,10 @@ Rect Layer_SphereDistort::get_bounding_rect()const { Rect bounds(Rect::full_plane()); + + if (clip) + return bounds; + switch(type) { case TYPE_NORMAL: