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

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

Issue 2576813002: Disable WEBGL_compressed_texture_etc1 on WebGL 1 on ANGLE (Closed)
Patch Set: update expectations 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
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/WebGLCompressedTextureETC1.h" 5 #include "modules/webgl/WebGLCompressedTextureETC1.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 WebGLCompressedTextureETC1::WebGLCompressedTextureETC1( 11 WebGLCompressedTextureETC1::WebGLCompressedTextureETC1(
12 WebGLRenderingContextBase* context) 12 WebGLRenderingContextBase* context)
13 : WebGLExtension(context) { 13 : WebGLExtension(context) {
14 context->addCompressedTextureFormat(GL_ETC1_RGB8_OES); 14 context->addCompressedTextureFormat(GL_ETC1_RGB8_OES);
15 } 15 }
16 16
17 WebGLExtensionName WebGLCompressedTextureETC1::name() const { 17 WebGLExtensionName WebGLCompressedTextureETC1::name() const {
18 return WebGLCompressedTextureETC1Name; 18 return WebGLCompressedTextureETC1Name;
19 } 19 }
20 20
21 WebGLCompressedTextureETC1* WebGLCompressedTextureETC1::create( 21 WebGLCompressedTextureETC1* WebGLCompressedTextureETC1::create(
22 WebGLRenderingContextBase* context) { 22 WebGLRenderingContextBase* context) {
23 return new WebGLCompressedTextureETC1(context); 23 return new WebGLCompressedTextureETC1(context);
24 } 24 }
25 25
26 bool WebGLCompressedTextureETC1::supported(WebGLRenderingContextBase* context) { 26 bool WebGLCompressedTextureETC1::supported(WebGLRenderingContextBase* context) {
27 Extensions3DUtil* extensionsUtil = context->extensionsUtil(); 27 Extensions3DUtil* extensionsUtil = context->extensionsUtil();
28 bool webgl1 = !context->isWebGL2OrHigher(); 28 return extensionsUtil->supportsExtension(
29 bool etc1 = 29 "GL_OES_compressed_ETC1_RGB8_texture");
30 extensionsUtil->supportsExtension("GL_OES_compressed_ETC1_RGB8_texture");
31 bool etc =
32 extensionsUtil->supportsExtension("GL_CHROMIUM_compressed_texture_etc");
33 return (webgl1 || etc) && etc1;
34 } 30 }
35 31
36 const char* WebGLCompressedTextureETC1::extensionName() { 32 const char* WebGLCompressedTextureETC1::extensionName() {
37 return "WEBGL_compressed_texture_etc1"; 33 return "WEBGL_compressed_texture_etc1";
38 } 34 }
39 35
40 } // namespace blink 36 } // namespace blink
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698