WebGPURenderPipelineColorAttachmentDescriptor.cpp [plain text]
#include "config.h"
#include "WebGPURenderPipelineColorAttachmentDescriptor.h"
#if ENABLE(WEBGPU)
#include "GPURenderPipelineColorAttachmentDescriptor.h"
#include "WebGPURenderingContext.h"
namespace WebCore {
Ref<WebGPURenderPipelineColorAttachmentDescriptor> WebGPURenderPipelineColorAttachmentDescriptor::create(WebGPURenderingContext* context, GPURenderPipelineColorAttachmentDescriptor* descriptor)
{
return adoptRef(*new WebGPURenderPipelineColorAttachmentDescriptor(context, descriptor));
}
WebGPURenderPipelineColorAttachmentDescriptor::WebGPURenderPipelineColorAttachmentDescriptor(WebGPURenderingContext* context, GPURenderPipelineColorAttachmentDescriptor* descriptor)
: WebGPUObject(context)
, m_renderPipelineColorAttachmentDescriptor(descriptor)
{
}
WebGPURenderPipelineColorAttachmentDescriptor::~WebGPURenderPipelineColorAttachmentDescriptor() = default;
unsigned long WebGPURenderPipelineColorAttachmentDescriptor::pixelFormat() const
{
if (!m_renderPipelineColorAttachmentDescriptor)
return 0;
return m_renderPipelineColorAttachmentDescriptor->pixelFormat();
}
void WebGPURenderPipelineColorAttachmentDescriptor::setPixelFormat(unsigned long newPixelFormat)
{
if (!m_renderPipelineColorAttachmentDescriptor)
return;
m_renderPipelineColorAttachmentDescriptor->setPixelFormat(newPixelFormat);
}
}
#endif