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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureS3TC.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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 20 matching lines...) Expand all
31 31
32 WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC( 32 WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC(
33 WebGLRenderingContextBase* context) 33 WebGLRenderingContextBase* context)
34 : WebGLExtension(context) { 34 : WebGLExtension(context) {
35 context->addCompressedTextureFormat(GL_COMPRESSED_RGB_S3TC_DXT1_EXT); 35 context->addCompressedTextureFormat(GL_COMPRESSED_RGB_S3TC_DXT1_EXT);
36 context->addCompressedTextureFormat(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT); 36 context->addCompressedTextureFormat(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT);
37 context->addCompressedTextureFormat(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT); 37 context->addCompressedTextureFormat(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT);
38 context->addCompressedTextureFormat(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT); 38 context->addCompressedTextureFormat(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT);
39 } 39 }
40 40
41 WebGLCompressedTextureS3TC::~WebGLCompressedTextureS3TC() {}
42
43 WebGLExtensionName WebGLCompressedTextureS3TC::name() const { 41 WebGLExtensionName WebGLCompressedTextureS3TC::name() const {
44 return WebGLCompressedTextureS3TCName; 42 return WebGLCompressedTextureS3TCName;
45 } 43 }
46 44
47 WebGLCompressedTextureS3TC* WebGLCompressedTextureS3TC::create( 45 WebGLCompressedTextureS3TC* WebGLCompressedTextureS3TC::create(
48 WebGLRenderingContextBase* context) { 46 WebGLRenderingContextBase* context) {
49 return new WebGLCompressedTextureS3TC(context); 47 return new WebGLCompressedTextureS3TC(context);
50 } 48 }
51 49
52 bool WebGLCompressedTextureS3TC::supported(WebGLRenderingContextBase* context) { 50 bool WebGLCompressedTextureS3TC::supported(WebGLRenderingContextBase* context) {
53 Extensions3DUtil* extensionsUtil = context->extensionsUtil(); 51 Extensions3DUtil* extensionsUtil = context->extensionsUtil();
54 return extensionsUtil->supportsExtension("GL_EXT_texture_compression_s3tc") || 52 return extensionsUtil->supportsExtension("GL_EXT_texture_compression_s3tc") ||
55 (extensionsUtil->supportsExtension( 53 (extensionsUtil->supportsExtension(
56 "GL_EXT_texture_compression_dxt1") && 54 "GL_EXT_texture_compression_dxt1") &&
57 extensionsUtil->supportsExtension( 55 extensionsUtil->supportsExtension(
58 "GL_CHROMIUM_texture_compression_dxt3") && 56 "GL_CHROMIUM_texture_compression_dxt3") &&
59 extensionsUtil->supportsExtension( 57 extensionsUtil->supportsExtension(
60 "GL_CHROMIUM_texture_compression_dxt5")); 58 "GL_CHROMIUM_texture_compression_dxt5"));
61 } 59 }
62 60
63 const char* WebGLCompressedTextureS3TC::extensionName() { 61 const char* WebGLCompressedTextureS3TC::extensionName() {
64 return "WEBGL_compressed_texture_s3tc"; 62 return "WEBGL_compressed_texture_s3tc";
65 } 63 }
66 64
67 } // namespace blink 65 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698