comparison layer/SpectrogramLayer.h @ 1024:3bce4c45b681 spectrogram-minor-refactor

Rearrange cache update calculations so as to use the actual painted width returned by paint functions (though they only ever return the same width as requested, at this point)
author Chris Cannam
date Mon, 25 Jan 2016 15:52:26 +0000
parents 74755fa6ea9e
children c02de0e34233
comparison
equal deleted inserted replaced
1023:74755fa6ea9e 1024:3bce4c45b681
416 typedef std::map<const LayerGeometryProvider *, MagnitudeRange> ViewMagMap; 416 typedef std::map<const LayerGeometryProvider *, MagnitudeRange> ViewMagMap;
417 mutable ViewMagMap m_viewMags; 417 mutable ViewMagMap m_viewMags;
418 mutable std::vector<MagnitudeRange> m_columnMags; 418 mutable std::vector<MagnitudeRange> m_columnMags;
419 void invalidateMagnitudes(); 419 void invalidateMagnitudes();
420 bool updateViewMagnitudes(LayerGeometryProvider *v) const; 420 bool updateViewMagnitudes(LayerGeometryProvider *v) const;
421 void paintDrawBuffer(LayerGeometryProvider *v, int w, int h, 421 int paintDrawBuffer(LayerGeometryProvider *v, int w, int h,
422 const std::vector<int> &binforx, 422 const std::vector<int> &binforx,
423 const std::vector<double> &binfory, 423 const std::vector<double> &binfory,
424 bool usePeaksCache, 424 bool usePeaksCache,
425 MagnitudeRange &overallMag, 425 MagnitudeRange &overallMag,
426 bool &overallMagChanged) const; 426 bool &overallMagChanged) const;
427 void paintDrawBufferPeakFrequencies(LayerGeometryProvider *v, int w, int h, 427 int paintDrawBufferPeakFrequencies(LayerGeometryProvider *v, int w, int h,
428 const std::vector<int> &binforx, 428 const std::vector<int> &binforx,
429 int minbin, 429 int minbin,
430 int maxbin, 430 int maxbin,
431 double displayMinFreq, 431 double displayMinFreq,
432 double displayMaxFreq, 432 double displayMaxFreq,
433 bool logarithmic, 433 bool logarithmic,
434 MagnitudeRange &overallMag, 434 MagnitudeRange &overallMag,
435 bool &overallMagChanged) const; 435 bool &overallMagChanged) const;
436 436
437 virtual void updateMeasureRectYCoords(LayerGeometryProvider *v, const MeasureRect &r) const; 437 virtual void updateMeasureRectYCoords(LayerGeometryProvider *v, const MeasureRect &r) const;
438 virtual void setMeasureRectYCoord(LayerGeometryProvider *v, MeasureRect &r, bool start, int y) const; 438 virtual void setMeasureRectYCoord(LayerGeometryProvider *v, MeasureRect &r, bool start, int y) const;
439 }; 439 };
440 440