summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.cpp')
-rw-r--r--Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.cpp22
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