diff options
Diffstat (limited to 'Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.cpp')
-rw-r--r-- | Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.cpp b/Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.cpp index d05d4178b..14b66f5fc 100644 --- a/Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.cpp +++ b/Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.cpp @@ -30,17 +30,17 @@ #include "WebGLCompressedTexturePVRTC.h" #include "Extensions3D.h" -#include "WebGLRenderingContext.h" +#include "WebGLRenderingContextBase.h" namespace WebCore { -WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC(WebGLRenderingContext* context) +WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC(WebGLRenderingContextBase& context) : WebGLExtension(context) { - context->addCompressedTextureFormat(Extensions3D::COMPRESSED_RGB_PVRTC_4BPPV1_IMG); - context->addCompressedTextureFormat(Extensions3D::COMPRESSED_RGB_PVRTC_2BPPV1_IMG); - context->addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_PVRTC_4BPPV1_IMG); - context->addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_PVRTC_2BPPV1_IMG); + context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGB_PVRTC_4BPPV1_IMG); + context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGB_PVRTC_2BPPV1_IMG); + context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_PVRTC_4BPPV1_IMG); + context.addCompressedTextureFormat(Extensions3D::COMPRESSED_RGBA_PVRTC_2BPPV1_IMG); } WebGLCompressedTexturePVRTC::~WebGLCompressedTexturePVRTC() @@ -52,15 +52,9 @@ WebGLExtension::ExtensionName WebGLCompressedTexturePVRTC::getName() const return WebGLCompressedTexturePVRTCName; } -OwnPtr<WebGLCompressedTexturePVRTC> WebGLCompressedTexturePVRTC::create(WebGLRenderingContext* context) +bool WebGLCompressedTexturePVRTC::supported(WebGLRenderingContextBase& context) { - return adoptPtr(new WebGLCompressedTexturePVRTC(context)); -} - -bool WebGLCompressedTexturePVRTC::supported(WebGLRenderingContext* context) -{ - Extensions3D* extensions = context->graphicsContext3D()->getExtensions(); - return extensions->supports("GL_IMG_texture_compression_pvrtc"); + return context.graphicsContext3D()->getExtensions().supports("GL_IMG_texture_compression_pvrtc"); } } // namespace WebCore |