oslbackend: began new backend classes

This commit is contained in:
itsmattkc
2020-02-05 14:49:55 +11:00
parent 91f1be90a9
commit 1e71c0e7f5
10 changed files with 125 additions and 29 deletions
+42
View File
@@ -0,0 +1,42 @@
#include "oslbackend.h"
#include <QEventLoop>
#include <QThread>
#include "oslworker.h"
OSLBackend::OSLBackend(QObject *parent) :
VideoRenderBackend(parent)
{
}
OSLBackend::~OSLBackend()
{
Close();
}
bool OSLBackend::InitInternal()
{
if (!VideoRenderBackend::InitInternal()) {
return false;
}
// Initiate one thread per CPU core
for (int i=0;i<threads().size();i++) {
// Create one processor object for each thread
OSLWorker* processor = new OSLWorker(frame_cache());
processor->SetParameters(params());
processors_.append(processor);
}
return true;
}
bool OSLBackend::CompileInternal()
{
return true;
}
void OSLBackend::DecompileInternal()
{
}