Mercurial > hg > svgui
diff layer/Colour3DPlotRenderer.cpp @ 1117:64709d4d09ef spectrogram-minor-refactor
Fix translucent mode for spectrogram
author | Chris Cannam |
---|---|
date | Tue, 19 Jul 2016 17:28:03 +0100 |
parents | e7a07cd63d21 |
children | 175d4e15884d |
line wrap: on
line diff
--- a/layer/Colour3DPlotRenderer.cpp Tue Jul 19 15:08:22 2016 +0100 +++ b/layer/Colour3DPlotRenderer.cpp Tue Jul 19 17:28:03 2016 +0100 @@ -16,6 +16,8 @@ #include "Colour3DPlotRenderer.h" #include "RenderTimer.h" +#include "base/Profiler.h" + #include "data/model/DenseThreeDimensionalModel.h" #include "data/model/Dense3DModelPeakCache.h" #include "data/model/FFTModel.h" @@ -247,8 +249,8 @@ // consider translucent option -- only if not smoothing & not // explicitly requested opaque & sufficiently zoomed-in - if (model->getHeight() < v->getPaintHeight() && - relativeBinResolution >= 2 * zoomLevel) { + if (model->getHeight() * 3 < v->getPaintHeight() && + relativeBinResolution >= 3 * zoomLevel) { return DirectTranslucent; } } @@ -265,6 +267,8 @@ QPainter &paint, QRect rect) { + Profiler profiler("Colour3DPlotRenderer::renderDirectTranslucent"); + QPoint illuminatePos; bool illuminate = v->shouldIlluminateLocalFeatures (m_sources.verticalBinLayer, illuminatePos); @@ -430,6 +434,7 @@ bool rightToLeft, bool timeConstrained) { + Profiler profiler("Colour3DPlotRenderer::renderToCachePixelResolution"); cerr << "renderToCachePixelResolution" << endl; // Draw to the draw buffer, and then copy from there. The draw @@ -520,6 +525,7 @@ Colour3DPlotRenderer::renderToCacheBinResolution(const LayerGeometryProvider *v, int x0, int repaintWidth) { + Profiler profiler("Colour3DPlotRenderer::renderToCacheBinResolution"); cerr << "renderToCacheBinResolution" << endl; // Draw to the draw buffer, and then scale-copy from there. Draw