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

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

Issue 2547813002: Remove WebGLObject maps from WebGLRenderingContextBase and WebGLContextGroup. (Closed)
Patch Set: Fixed WebGLContextObject::validate. Made WebGLExtension non-finalized. Created 4 years 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/webgl/WebGLCompressedTextureS3TCsRGB.h" 5 #include "modules/webgl/WebGLCompressedTextureS3TCsRGB.h"
6 6
7 #include "modules/webgl/WebGLRenderingContextBase.h" 7 #include "modules/webgl/WebGLRenderingContextBase.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 WebGLCompressedTextureS3TCsRGB::WebGLCompressedTextureS3TCsRGB( 11 WebGLCompressedTextureS3TCsRGB::WebGLCompressedTextureS3TCsRGB(
12 WebGLRenderingContextBase* context) 12 WebGLRenderingContextBase* context)
13 : WebGLExtension(context) { 13 : WebGLExtension(context) {
14 // TODO(kainino): update these with _EXT versions once 14 // TODO(kainino): update these with _EXT versions once
15 // GL_EXT_compressed_texture_s3tc_srgb is ratified 15 // GL_EXT_compressed_texture_s3tc_srgb is ratified
16 context->addCompressedTextureFormat(GL_COMPRESSED_SRGB_S3TC_DXT1_NV); 16 context->addCompressedTextureFormat(GL_COMPRESSED_SRGB_S3TC_DXT1_NV);
17 context->addCompressedTextureFormat(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV); 17 context->addCompressedTextureFormat(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV);
18 context->addCompressedTextureFormat(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV); 18 context->addCompressedTextureFormat(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV);
19 context->addCompressedTextureFormat(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV); 19 context->addCompressedTextureFormat(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV);
20 } 20 }
21 21
22 WebGLCompressedTextureS3TCsRGB::~WebGLCompressedTextureS3TCsRGB() {}
23
24 WebGLExtensionName WebGLCompressedTextureS3TCsRGB::name() const { 22 WebGLExtensionName WebGLCompressedTextureS3TCsRGB::name() const {
25 return WebGLCompressedTextureS3TCsRGBName; 23 return WebGLCompressedTextureS3TCsRGBName;
26 } 24 }
27 25
28 WebGLCompressedTextureS3TCsRGB* WebGLCompressedTextureS3TCsRGB::create( 26 WebGLCompressedTextureS3TCsRGB* WebGLCompressedTextureS3TCsRGB::create(
29 WebGLRenderingContextBase* context) { 27 WebGLRenderingContextBase* context) {
30 return new WebGLCompressedTextureS3TCsRGB(context); 28 return new WebGLCompressedTextureS3TCsRGB(context);
31 } 29 }
32 30
33 bool WebGLCompressedTextureS3TCsRGB::supported( 31 bool WebGLCompressedTextureS3TCsRGB::supported(
34 WebGLRenderingContextBase* context) { 32 WebGLRenderingContextBase* context) {
35 Extensions3DUtil* extensionsUtil = context->extensionsUtil(); 33 Extensions3DUtil* extensionsUtil = context->extensionsUtil();
36 return extensionsUtil->supportsExtension( 34 return extensionsUtil->supportsExtension(
37 "GL_EXT_texture_compression_s3tc_srgb"); 35 "GL_EXT_texture_compression_s3tc_srgb");
38 } 36 }
39 37
40 const char* WebGLCompressedTextureS3TCsRGB::extensionName() { 38 const char* WebGLCompressedTextureS3TCsRGB::extensionName() {
41 return "WEBGL_compressed_texture_s3tc_srgb"; 39 return "WEBGL_compressed_texture_s3tc_srgb";
42 } 40 }
43 41
44 } // namespace blink 42 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698