diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.cpp | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
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 |