This source file includes following definitions.
- name
- create
- getTranslatedShaderSource
- supported
- extensionName
#include "config.h"
#include "core/html/canvas/WebGLDebugShaders.h"
#include "bindings/v8/ExceptionState.h"
#include "core/html/canvas/WebGLRenderingContextBase.h"
#include "core/html/canvas/WebGLShader.h"
namespace WebCore {
WebGLDebugShaders::WebGLDebugShaders(WebGLRenderingContextBase* context)
: WebGLExtension(context)
{
ScriptWrappable::init(this);
}
WebGLDebugShaders::~WebGLDebugShaders()
{
}
WebGLExtensionName WebGLDebugShaders::name() const
{
return WebGLDebugShadersName;
}
PassRefPtr<WebGLDebugShaders> WebGLDebugShaders::create(WebGLRenderingContextBase* context)
{
return adoptRef(new WebGLDebugShaders(context));
}
String WebGLDebugShaders::getTranslatedShaderSource(WebGLShader* shader)
{
if (isLost())
return String();
if (!m_context->validateWebGLObject("getTranslatedShaderSource", shader))
return "";
return m_context->ensureNotNull(m_context->webGraphicsContext3D()->getTranslatedShaderSourceANGLE(shader->object()));
}
bool WebGLDebugShaders::supported(WebGLRenderingContextBase* context)
{
return context->extensionsUtil()->supportsExtension("GL_ANGLE_translated_shader_source");
}
const char* WebGLDebugShaders::extensionName()
{
return "WEBGL_debug_shaders";
}
}