| OLD | NEW |
| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 WebGLCompressedTextureS3TC::~WebGLCompressedTextureS3TC() | 48 WebGLCompressedTextureS3TC::~WebGLCompressedTextureS3TC() |
| 49 { | 49 { |
| 50 } | 50 } |
| 51 | 51 |
| 52 WebGLExtension::ExtensionName WebGLCompressedTextureS3TC::getName() const | 52 WebGLExtension::ExtensionName WebGLCompressedTextureS3TC::getName() const |
| 53 { | 53 { |
| 54 return WebGLCompressedTextureS3TCName; | 54 return WebGLCompressedTextureS3TCName; |
| 55 } | 55 } |
| 56 | 56 |
| 57 PassOwnPtr<WebGLCompressedTextureS3TC> WebGLCompressedTextureS3TC::create(WebGLR
enderingContext* context) | 57 PassRefPtr<WebGLCompressedTextureS3TC> WebGLCompressedTextureS3TC::create(WebGLR
enderingContext* context) |
| 58 { | 58 { |
| 59 return adoptPtr(new WebGLCompressedTextureS3TC(context)); | 59 return adoptRef(new WebGLCompressedTextureS3TC(context)); |
| 60 } | 60 } |
| 61 | 61 |
| 62 bool WebGLCompressedTextureS3TC::supported(WebGLRenderingContext* context) | 62 bool WebGLCompressedTextureS3TC::supported(WebGLRenderingContext* context) |
| 63 { | 63 { |
| 64 Extensions3D* extensions = context->graphicsContext3D()->getExtensions(); | 64 Extensions3D* extensions = context->graphicsContext3D()->getExtensions(); |
| 65 return extensions->supports("GL_EXT_texture_compression_s3tc") | 65 return extensions->supports("GL_EXT_texture_compression_s3tc") |
| 66 || (extensions->supports("GL_EXT_texture_compression_dxt1") | 66 || (extensions->supports("GL_EXT_texture_compression_dxt1") |
| 67 && extensions->supports("GL_CHROMIUM_texture_compression_dxt3") | 67 && extensions->supports("GL_CHROMIUM_texture_compression_dxt3") |
| 68 && extensions->supports("GL_CHROMIUM_texture_compression_dxt5")); | 68 && extensions->supports("GL_CHROMIUM_texture_compression_dxt5")); |
| 69 } | 69 } |
| 70 | 70 |
| 71 const char* WebGLCompressedTextureS3TC::getExtensionName() | 71 const char* WebGLCompressedTextureS3TC::getExtensionName() |
| 72 { | 72 { |
| 73 return "WEBGL_compressed_texture_s3tc"; | 73 return "WEBGL_compressed_texture_s3tc"; |
| 74 } | 74 } |
| 75 | 75 |
| 76 } // namespace WebCore | 76 } // namespace WebCore |
| OLD | NEW |