From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- .../html/canvas/WebGLCompressedTexturePVRTC.cpp | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.cpp') 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::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 -- cgit v1.2.1