change: Switch to offical OpenFX Support. Still can't compile.

This commit is contained in:
Mike Solar
2025-09-03 21:14:56 +08:00
parent 7ff76427f9
commit b649b5e1bd
198 changed files with 57444 additions and 980 deletions
+64
View File
@@ -0,0 +1,64 @@
// ofx host
// ofx
#include "ofxCore.h"
#include "ofxImageEffect.h"
// ofx host
#include "ofxhMemory.h"
namespace OFX {
namespace Host {
namespace Memory {
Instance::Instance() : _ptr(0), _locked(0) {}
Instance::~Instance() {
delete [] _ptr;
}
bool Instance::alloc(size_t nBytes) {
if(!_locked){
if(_ptr)
freeMem();
_ptr = new char[nBytes];
return true;
}
else
return false;
}
OfxImageMemoryHandle Instance::getHandle(){
return (OfxImageMemoryHandle)this;
}
void Instance::freeMem(){
delete [] _ptr;
_ptr = 0;
_locked = 0;
}
void* Instance::getPtr() {
return _ptr;
}
void Instance::lock() {
++_locked;
}
void Instance::unlock() {
if (_locked > 0) {
--_locked;
}
}
} // Memory
} // Host
} // OFX