Code

Added UI for threading pref in Filter Preferences for Gaussian Blur, default 1 for...
authorJosh Andler <scislac@gmail.com>
Sun, 6 Dec 2009 22:19:59 +0000 (14:19 -0800)
committerJosh Andler <scislac@gmail.com>
Sun, 6 Dec 2009 22:19:59 +0000 (14:19 -0800)
src/preferences-skeleton.h
src/ui/dialog/inkscape-preferences.cpp
src/ui/dialog/inkscape-preferences.h

index 70d1140bab4f9dbc069b76d19fc38fd84dead008..4e5291bafd74a34f6b642ba9af96634738bd4243 100644 (file)
@@ -340,6 +340,7 @@ static char const preferences_skeleton[] =
 "    </group>\n"
 "    <group id=\"workarounds\"\n"
 "           colorsontop=\"0\"/>\n"
+"    <group id=\"threading\" numthreads=\"1\"/>\n"
 "  </group>\n"
 "\n"
 "  <group id=\"extensions\">"
index b217f8695ce37eeea8e168f6ce4b070baf41273a..90516063c766727762f20559331893bd44a9f676 100644 (file)
@@ -741,6 +741,11 @@ void InkscapePreferences::initPageFilters()
     _page_filters.add_line(true, "", _show_filters_info_box, "",
                         _("Show icons and descriptions for the filter primitives available at the filter effects dialog."));
 
+    /* threaded blur */ //related comments/widgets/functions should be renamed and option should be moved elsewhere when inkscape is fully multi-threaded
+    _filter_multi_threaded.init("/options/threading/numthreads", 1.0, 8.0, 1.0, 2.0, 4.0, true, false);
+    _page_filters.add_line( false, _("Number of Threads:"), _filter_multi_threaded, _("(requires restart)"),
+                           _("Configure number of processors/threads to use with rendering of gaussian blur."), false);
+
     this->AddPage(_page_filters, _("Filters"), PREFS_PAGE_FILTERS);
 }
 
index 705e7a352007dbab597699dd38939da6f93a0174..16e62df59b70461914da10921fbb081357b27f37 100644 (file)
@@ -171,6 +171,7 @@ protected:
     PrefRadioButton _blur_quality_best, _blur_quality_better, _blur_quality_normal, _blur_quality_worse, _blur_quality_worst;
     PrefRadioButton _filter_quality_best, _filter_quality_better, _filter_quality_normal, _filter_quality_worse, _filter_quality_worst;
     PrefCheckButton _show_filters_info_box;
+    PrefSpinButton  _filter_multi_threaded;
 
     PrefCheckButton _trans_scale_stroke, _trans_scale_corner, _trans_gradient,_trans_pattern;
     PrefRadioButton _trans_optimized, _trans_preserved;