~uriboni/+junk/filters

« back to all changes in this revision

Viewing changes to backend/modules/Filters/halide_transform.cpp

  • Committer: Florian Boucault
  • Date: 2015-02-23 14:11:31 UTC
  • Revision ID: florian.boucault@canonical.com-20150223141131-saclg8xjddfxvut3
Simplified generator registry

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
#include <QtQuick/QQuickItem>
10
10
#include <Halide.h>
11
11
 
12
 
#include "generatorhelperregistry.h"
13
 
 
 
12
QHash<Halide::Internal::GeneratorBase*, getOutputGeometry> GeneratorHelperRegistry::outputGeometryFunctions;
14
13
 
15
14
HalideTransform::HalideTransform(QObject *parent,
16
15
                                 bool resultRequired,
184
183
 
185
184
    if (m_generator) {
186
185
        QRect outAndMin;
187
 
        calculateOutputAndMinFunction outAndMinCalculator = GeneratorHelperRegistry::instance()->get(m_generator.get());
 
186
        getOutputGeometry outAndMinCalculator = GeneratorHelperRegistry::outputGeometryFunctions[m_generator.get()];
188
187
        if (outAndMinCalculator) {
189
188
            outAndMin = outAndMinCalculator(m_generator.get());
190
189
            m_textureSize = QSize(outAndMin.width(), outAndMin.height());