Index: third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureS3TCsRGB.cpp |
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureS3TC.cpp b/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureS3TCsRGB.cpp |
similarity index 56% |
copy from third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureS3TC.cpp |
copy to third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureS3TCsRGB.cpp |
index c2f3aefbebd4d0f2a25d177edf3d9cbf3829f47f..e085bf0c1739dfeb68d240af5e15633616b2538c 100644 |
--- a/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureS3TC.cpp |
+++ b/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureS3TCsRGB.cpp |
@@ -1,5 +1,5 @@ |
/* |
- * Copyright (C) 2011 Google Inc. All rights reserved. |
+ * Copyright (C) 2016 Google Inc. All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
@@ -23,47 +23,44 @@ |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#include "modules/webgl/WebGLCompressedTextureS3TC.h" |
+#include "modules/webgl/WebGLCompressedTextureS3TCsRGB.h" |
#include "modules/webgl/WebGLRenderingContextBase.h" |
namespace blink { |
-WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC(WebGLRenderingContextBase* context) |
+WebGLCompressedTextureS3TCsRGB::WebGLCompressedTextureS3TCsRGB(WebGLRenderingContextBase* context) |
: WebGLExtension(context) |
{ |
- context->addCompressedTextureFormat(GL_COMPRESSED_RGB_S3TC_DXT1_EXT); |
- context->addCompressedTextureFormat(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT); |
- context->addCompressedTextureFormat(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT); |
- context->addCompressedTextureFormat(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT); |
+ context->addCompressedTextureFormat(GL_COMPRESSED_SRGB_S3TC_DXT1_NV); |
+ context->addCompressedTextureFormat(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV); |
+ context->addCompressedTextureFormat(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV); |
+ context->addCompressedTextureFormat(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV); |
Kai Ninomiya
2016/09/15 21:54:08
Should these be left as _NV, or should we define t
Ken Russell (switch to Gerrit)
2016/09/15 23:38:26
We'd need to modify src/third_party/khronos/GLES2/
|
} |
-WebGLCompressedTextureS3TC::~WebGLCompressedTextureS3TC() |
+WebGLCompressedTextureS3TCsRGB::~WebGLCompressedTextureS3TCsRGB() |
{ |
} |
-WebGLExtensionName WebGLCompressedTextureS3TC::name() const |
+WebGLExtensionName WebGLCompressedTextureS3TCsRGB::name() const |
{ |
- return WebGLCompressedTextureS3TCName; |
+ return WebGLCompressedTextureS3TCsRGBName; |
} |
-WebGLCompressedTextureS3TC* WebGLCompressedTextureS3TC::create(WebGLRenderingContextBase* context) |
+WebGLCompressedTextureS3TCsRGB* WebGLCompressedTextureS3TCsRGB::create(WebGLRenderingContextBase* context) |
{ |
- return new WebGLCompressedTextureS3TC(context); |
+ return new WebGLCompressedTextureS3TCsRGB(context); |
} |
-bool WebGLCompressedTextureS3TC::supported(WebGLRenderingContextBase* context) |
+bool WebGLCompressedTextureS3TCsRGB::supported(WebGLRenderingContextBase* context) |
{ |
Extensions3DUtil* extensionsUtil = context->extensionsUtil(); |
- return extensionsUtil->supportsExtension("GL_EXT_texture_compression_s3tc") |
- || (extensionsUtil->supportsExtension("GL_EXT_texture_compression_dxt1") |
- && extensionsUtil->supportsExtension("GL_CHROMIUM_texture_compression_dxt3") |
- && extensionsUtil->supportsExtension("GL_CHROMIUM_texture_compression_dxt5")); |
+ return extensionsUtil->supportsExtension("GL_EXT_texture_compression_s3tc_srgb"); |
} |
-const char* WebGLCompressedTextureS3TC::extensionName() |
+const char* WebGLCompressedTextureS3TCsRGB::extensionName() |
{ |
- return "WEBGL_compressed_texture_s3tc"; |
+ return "WEBGL_compressed_texture_s3tc_srgb"; |
} |
} // namespace blink |