This source file includes following definitions.
- name
- create
- supported
- extensionName
#include "config.h"
#include "core/html/canvas/WebGLCompressedTexturePVRTC.h"
#include "core/html/canvas/WebGLRenderingContextBase.h"
namespace WebCore {
WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC(WebGLRenderingContextBase* context)
: WebGLExtension(context)
{
ScriptWrappable::init(this);
context->addCompressedTextureFormat(GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG);
context->addCompressedTextureFormat(GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG);
context->addCompressedTextureFormat(GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG);
context->addCompressedTextureFormat(GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG);
}
WebGLCompressedTexturePVRTC::~WebGLCompressedTexturePVRTC()
{
}
WebGLExtensionName WebGLCompressedTexturePVRTC::name() const
{
return WebGLCompressedTexturePVRTCName;
}
PassRefPtr<WebGLCompressedTexturePVRTC> WebGLCompressedTexturePVRTC::create(WebGLRenderingContextBase* context)
{
return adoptRef(new WebGLCompressedTexturePVRTC(context));
}
bool WebGLCompressedTexturePVRTC::supported(WebGLRenderingContextBase* context)
{
return context->extensionsUtil()->supportsExtension("GL_IMG_texture_compression_pvrtc");
}
const char* WebGLCompressedTexturePVRTC::extensionName()
{
return "WEBGL_compressed_texture_pvrtc";
}
}