Improve the logic for when to use the tile renderer. At lower resolutions we can...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 31 Jan 2008 14:12:46 +0000 (14:12 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 31 Jan 2008 14:12:46 +0000 (14:12 +0000)
git-svn-id: http://svn.voria.com/code@1533 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/workarea.cpp

index f436f91..5cd526d 100644 (file)
@@ -2266,9 +2266,9 @@ studio::WorkArea::async_update_preview()
        handle<Target> target;
 
        // if we have lots of pixels to render and the tile renderer isn't disabled, use it
-       int div = 1 << lowrespixel;
-       if(w*h>(low_resolution?480*270:480*270/div) &&
-          !getenv("SYNFIG_DISABLE_TILE_RENDER"))
+       int div;
+       div = low_resolution ? (1 << lowrespixel) : 1;
+       if (w*h > 240*div*135*div && !getenv("SYNFIG_DISABLE_TILE_RENDER"))
        {
                // do a tile render
                handle<WorkAreaTarget> trgt(new class WorkAreaTarget(this,w,h));