Files
oak-editor/src/render/transition/common/jobtime.h
T
Mike-Solar edbd3913af refactor(render): de-Qt oakrender and wrap it in a pure C ABI
- copy engine/render to src/render/src (sunk param types excluded),
  de-Qt in five parallel groups: core machinery (tickets/worker pool/
  jobs), caches, color/texture, preview/IPC, GPU backends
- replace Qt GL/Vulkan wrappers with native context abstractions
  (CGL/EGL/WGL, raw vulkan.h), QProcess with POSIX WorkerProcess,
  QJsonObject with a minimal NDJSON-compatible workerjson (wire
  protocol unchanged), QDataStream disk state with a byte-compatible
  BinaryStream
- signals become single std::function callbacks or facade-triggered
  calls per the documented signal/slot strategy
- pure C ABI in include/render + src/render/c_api (renderer/cache/
  color/manager families, OAKRENDER_E_* codes), 37 gtest cases
- bridge src/node/transition/render/* stubs to the real oakrender
  headers, closing the node<->render cycle: liboaknode links
  liboakrender, zero dangling symbols
- docs: M7 implementation status + oakrender semantic-change notes
2026-08-06 03:21:26 +08:00

35 lines
1.0 KiB
C++

#pragma once
// Transitional: engine/common/jobtime.h de-Qt target form. Original kept a
// process-global mutex-protected counter; the atomic below preserves the same
// monotonic-unique semantics. oakcommon has no jobtime.h yet (M-common folds
// it in); renderjobtracker.h includes "common/jobtime.h".
#include <atomic>
#include <cstdint>
namespace olive {
class JobTime {
public:
JobTime() { acquire(); }
void acquire()
{
static std::atomic<uint64_t> index{ 0 };
value_ = index.fetch_add(1, std::memory_order_relaxed);
}
uint64_t value() const { return value_; }
bool operator==(const JobTime &rhs) const { return value_ == rhs.value_; }
bool operator!=(const JobTime &rhs) const { return value_ != rhs.value_; }
bool operator<(const JobTime &rhs) const { return value_ < rhs.value_; }
bool operator>(const JobTime &rhs) const { return value_ > rhs.value_; }
bool operator<=(const JobTime &rhs) const { return value_ <= rhs.value_; }
bool operator>=(const JobTime &rhs) const { return value_ >= rhs.value_; }
private:
uint64_t value_;
};
}