Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureES30.cpp

Issue 2354713004: Implement WEBGL_compressed_texture_es3_0 extension for WebGL 1/2 (Closed)
Patch Set: fixup Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "modules/webgl/WebGLCompressedTextureES30.h"
6
7 #include "modules/webgl/WebGLRenderingContextBase.h"
8
9 namespace blink {
10
11 WebGLCompressedTextureES30::WebGLCompressedTextureES30(WebGLRenderingContextBase * context)
12 : WebGLExtension(context)
13 {
14 context->addCompressedTextureFormat(GL_COMPRESSED_R11_EAC);
15 context->addCompressedTextureFormat(GL_COMPRESSED_SIGNED_R11_EAC);
16 context->addCompressedTextureFormat(GL_COMPRESSED_RGB8_ETC2);
17 context->addCompressedTextureFormat(GL_COMPRESSED_SRGB8_ETC2);
18 context->addCompressedTextureFormat(GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_E TC2);
19 context->addCompressedTextureFormat(GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ ETC2);
20 context->addCompressedTextureFormat(GL_COMPRESSED_RG11_EAC);
21 context->addCompressedTextureFormat(GL_COMPRESSED_SIGNED_RG11_EAC);
22 context->addCompressedTextureFormat(GL_COMPRESSED_RGBA8_ETC2_EAC);
23 context->addCompressedTextureFormat(GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC);
24 }
25
26 WebGLCompressedTextureES30::~WebGLCompressedTextureES30()
27 {
28 }
29
30 WebGLExtensionName WebGLCompressedTextureES30::name() const
31 {
32 return WebGLCompressedTextureES30Name;
33 }
34
35 WebGLCompressedTextureES30* WebGLCompressedTextureES30::create(WebGLRenderingCon textBase* context)
36 {
37 return new WebGLCompressedTextureES30(context);
38 }
39
40 bool WebGLCompressedTextureES30::supported(WebGLRenderingContextBase* context)
41 {
42 Extensions3DUtil* extensionsUtil = context->extensionsUtil();
43 return extensionsUtil->supportsExtension("GL_CHROMIUM_compressed_texture_es3 _0");
44 }
45
46 const char* WebGLCompressedTextureES30::extensionName()
47 {
48 return "WEBGL_compressed_texture_es3_0";
49 }
50
51 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698