From 59a89a640809c6f03a69fd3df823c5bef1260424 Mon Sep 17 00:00:00 2001 From: kiirala Date: Wed, 24 Oct 2007 10:25:25 +0000 Subject: [PATCH] Added 'paraller axis' rendering hint to filter primitives, that need it. --- src/display/nr-filter-convolve-matrix.cpp | 4 ++++ src/display/nr-filter-convolve-matrix.h | 1 + src/display/nr-filter-diffuselighting.cpp | 4 ++++ src/display/nr-filter-diffuselighting.h | 1 + src/display/nr-filter-displacement-map.cpp | 4 ++++ src/display/nr-filter-displacement-map.h | 1 + src/display/nr-filter-image.cpp | 4 ++++ src/display/nr-filter-image.h | 1 + src/display/nr-filter-morphology.cpp | 4 ++++ src/display/nr-filter-morphology.h | 1 + src/display/nr-filter-specularlighting.cpp | 4 ++++ src/display/nr-filter-specularlighting.h | 1 + src/display/nr-filter-tile.cpp | 4 ++++ src/display/nr-filter-tile.h | 1 + src/display/nr-filter-turbulence.cpp | 4 ++++ src/display/nr-filter-turbulence.h | 1 + 16 files changed, 40 insertions(+) diff --git a/src/display/nr-filter-convolve-matrix.cpp b/src/display/nr-filter-convolve-matrix.cpp index 6adf9c9a5..13bc585c9 100644 --- a/src/display/nr-filter-convolve-matrix.cpp +++ b/src/display/nr-filter-convolve-matrix.cpp @@ -126,6 +126,10 @@ void FilterConvolveMatrix::area_enlarge(NRRectL &area, Matrix const &trans) area.y1 += orderY - targetY; } +FilterTraits FilterConvolveMatrix::get_input_traits() { + return TRAIT_PARALLER; +} + } /* namespace NR */ /* diff --git a/src/display/nr-filter-convolve-matrix.h b/src/display/nr-filter-convolve-matrix.h index 2a397abf2..ec47028e1 100644 --- a/src/display/nr-filter-convolve-matrix.h +++ b/src/display/nr-filter-convolve-matrix.h @@ -35,6 +35,7 @@ public: virtual int render(FilterSlot &slot, Matrix const &trans); virtual void area_enlarge(NRRectL &area, Matrix const &trans); + virtual FilterTraits get_input_traits(); void set_targetY(int coord); void set_targetX(int coord); diff --git a/src/display/nr-filter-diffuselighting.cpp b/src/display/nr-filter-diffuselighting.cpp index 500a275af..0fa0495e7 100644 --- a/src/display/nr-filter-diffuselighting.cpp +++ b/src/display/nr-filter-diffuselighting.cpp @@ -169,6 +169,10 @@ int FilterDiffuseLighting::render(FilterSlot &slot, Matrix const &trans) { return 0; } +FilterTraits FilterDiffuseLighting::get_input_traits() { + return TRAIT_PARALLER; +} + } /* namespace NR */ /* diff --git a/src/display/nr-filter-diffuselighting.h b/src/display/nr-filter-diffuselighting.h index 486b81aca..37da884ca 100644 --- a/src/display/nr-filter-diffuselighting.h +++ b/src/display/nr-filter-diffuselighting.h @@ -41,6 +41,7 @@ public: static FilterPrimitive *create(); virtual ~FilterDiffuseLighting(); virtual int render(FilterSlot &slot, Matrix const &trans); + virtual FilterTraits get_input_traits(); private: }; diff --git a/src/display/nr-filter-displacement-map.cpp b/src/display/nr-filter-displacement-map.cpp index 9e87fdddc..f40510928 100644 --- a/src/display/nr-filter-displacement-map.cpp +++ b/src/display/nr-filter-displacement-map.cpp @@ -132,6 +132,10 @@ void FilterDisplacementMap::area_enlarge(NRRectL &area, Matrix const &trans) area.y1 += (int)(scale/2); } +FilterTraits FilterDisplacementMap::get_input_traits() { + return TRAIT_PARALLER; +} + } /* namespace NR */ /* diff --git a/src/display/nr-filter-displacement-map.h b/src/display/nr-filter-displacement-map.h index 83601a5ac..bf0565c22 100644 --- a/src/display/nr-filter-displacement-map.h +++ b/src/display/nr-filter-displacement-map.h @@ -31,6 +31,7 @@ public: virtual void set_channel_selector(int channel, int s); virtual int render(FilterSlot &slot, Matrix const &trans); virtual void area_enlarge(NRRectL &area, Matrix const &trans); + virtual FilterTraits get_input_traits(); private: double scale; diff --git a/src/display/nr-filter-image.cpp b/src/display/nr-filter-image.cpp index 8e89cdc81..bd5e52965 100644 --- a/src/display/nr-filter-image.cpp +++ b/src/display/nr-filter-image.cpp @@ -73,6 +73,10 @@ void FilterImage::set_region(SVGLength x, SVGLength y, SVGLength width, SVGLengt feImageWidth=width.computed; feImageHeight=height.computed; } + +FilterTraits FilterImage::get_input_traits() { + return TRAIT_PARALLER; +} } /* namespace NR */ diff --git a/src/display/nr-filter-image.h b/src/display/nr-filter-image.h index 5841ad86a..0e522139c 100644 --- a/src/display/nr-filter-image.h +++ b/src/display/nr-filter-image.h @@ -25,6 +25,7 @@ public: virtual ~FilterImage(); virtual int render(FilterSlot &slot, Matrix const &trans); + virtual FilterTraits get_input_traits(); void set_region(SVGLength x, SVGLength y, SVGLength width, SVGLength height); private: guint8* image_pixbuf; diff --git a/src/display/nr-filter-morphology.cpp b/src/display/nr-filter-morphology.cpp index 07b1b1d94..6cc6dd7b8 100644 --- a/src/display/nr-filter-morphology.cpp +++ b/src/display/nr-filter-morphology.cpp @@ -99,6 +99,10 @@ void FilterMorphology::set_yradius(int y){ yradius = y; } +FilterTraits FilterMorphology::get_input_traits() { + return TRAIT_PARALLER; +} + } /* namespace NR */ /* diff --git a/src/display/nr-filter-morphology.h b/src/display/nr-filter-morphology.h index be182203c..7283b0cea 100644 --- a/src/display/nr-filter-morphology.h +++ b/src/display/nr-filter-morphology.h @@ -31,6 +31,7 @@ public: virtual int render(FilterSlot &slot, Matrix const &trans); virtual void area_enlarge(NRRectL &area, Matrix const &trans); + virtual FilterTraits get_input_traits(); void set_operator(FilterMorphologyOperator &o); void set_xradius(int x); void set_yradius(int y); diff --git a/src/display/nr-filter-specularlighting.cpp b/src/display/nr-filter-specularlighting.cpp index 90d243a6b..ca8bca6a8 100644 --- a/src/display/nr-filter-specularlighting.cpp +++ b/src/display/nr-filter-specularlighting.cpp @@ -179,6 +179,10 @@ int FilterSpecularLighting::render(FilterSlot &slot, Matrix const &trans) { return 0; } +FilterTraits FilterSpecularLighting::get_input_traits() { + return TRAIT_PARALLER; +} + } /* namespace NR */ /* diff --git a/src/display/nr-filter-specularlighting.h b/src/display/nr-filter-specularlighting.h index a9b3429f4..578b7ad4a 100644 --- a/src/display/nr-filter-specularlighting.h +++ b/src/display/nr-filter-specularlighting.h @@ -42,6 +42,7 @@ public: static FilterPrimitive *create(); virtual ~FilterSpecularLighting(); virtual int render(FilterSlot &slot, Matrix const &trans); + virtual FilterTraits get_input_traits(); private: }; diff --git a/src/display/nr-filter-tile.cpp b/src/display/nr-filter-tile.cpp index 69d577687..39e2bff33 100644 --- a/src/display/nr-filter-tile.cpp +++ b/src/display/nr-filter-tile.cpp @@ -46,6 +46,10 @@ void FilterTile::area_enlarge(NRRectL &area, Matrix const &trans) { } +FilterTraits FilterTile::get_input_traits() { + return TRAIT_PARALLER; +} + } /* namespace NR */ /* diff --git a/src/display/nr-filter-tile.h b/src/display/nr-filter-tile.h index 32aa7b086..56c26bd66 100644 --- a/src/display/nr-filter-tile.h +++ b/src/display/nr-filter-tile.h @@ -27,6 +27,7 @@ public: virtual int render(FilterSlot &slot, Matrix const &trans); virtual void area_enlarge(NRRectL &area, Matrix const &trans); + virtual FilterTraits get_input_traits(); }; } /* namespace NR */ diff --git a/src/display/nr-filter-turbulence.cpp b/src/display/nr-filter-turbulence.cpp index d0921047a..b3938418f 100644 --- a/src/display/nr-filter-turbulence.cpp +++ b/src/display/nr-filter-turbulence.cpp @@ -295,6 +295,10 @@ double FilterTurbulence::turbulence(int nColorChannel, double *point) return fSum; } +FilterTraits FilterTurbulence::get_input_traits() { + return TRAIT_PARALLER; +} + } /* namespace NR */ /* diff --git a/src/display/nr-filter-turbulence.h b/src/display/nr-filter-turbulence.h index db2b2854a..03c2e22a5 100644 --- a/src/display/nr-filter-turbulence.h +++ b/src/display/nr-filter-turbulence.h @@ -66,6 +66,7 @@ public: virtual void set_stitchTiles(bool st); virtual void set_type(FilterTurbulenceType t); virtual void set_updated(bool u); + virtual FilterTraits get_input_traits(); private: long Turbulence_setup_seed(long lSeed); -- 2.30.2