#include "include/gpu/ganesh/GrBackendSemaphore.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkDebug.h"
#include "src/gpu/ganesh/GrBackendSemaphorePriv.h"
#ifdef SK_DIRECT3D
#include "include/gpu/ganesh/d3d/GrD3DTypes.h"
#endif
GrBackendSemaphore::GrBackendSemaphore()
: … { … }
GrBackendSemaphoreData::~GrBackendSemaphoreData() = default;
GrBackendSemaphore::~GrBackendSemaphore() { … }
GrBackendSemaphore::GrBackendSemaphore(const GrBackendSemaphore& that) { … }
GrBackendSemaphore& GrBackendSemaphore::operator=(const GrBackendSemaphore& that) { … }
#ifdef SK_DIRECT3D
void GrBackendSemaphore::assignD3DFenceInfo(const GrD3DFenceInfo& info) {
SkASSERT(GrBackendApi::kDirect3D == fBackend);
if (fIsInitialized) {
*fD3DFenceInfo = info;
} else {
fD3DFenceInfo = new GrD3DFenceInfo(info);
}
}
bool GrBackendSemaphore::getD3DFenceInfo(GrD3DFenceInfo* outInfo) const {
if (fIsInitialized && GrBackendApi::kDirect3D == fBackend) {
*outInfo = *fD3DFenceInfo;
return true;
}
return false;
}
#endif