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

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

Issue 2499413003: disable ETC1 on ANGLE's ES3 (Closed)
Patch Set: update expectations Created 4 years, 1 month 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 | « content/test/gpu/gpu_tests/webgl2_conformance_expectations.py ('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 WebGLCompressedTextureETC1::~WebGLCompressedTextureETC1() {} 17 WebGLCompressedTextureETC1::~WebGLCompressedTextureETC1() {}
18 18
19 WebGLExtensionName WebGLCompressedTextureETC1::name() const { 19 WebGLExtensionName WebGLCompressedTextureETC1::name() const {
20 return WebGLCompressedTextureETC1Name; 20 return WebGLCompressedTextureETC1Name;
21 } 21 }
22 22
23 WebGLCompressedTextureETC1* WebGLCompressedTextureETC1::create( 23 WebGLCompressedTextureETC1* WebGLCompressedTextureETC1::create(
24 WebGLRenderingContextBase* context) { 24 WebGLRenderingContextBase* context) {
25 return new WebGLCompressedTextureETC1(context); 25 return new WebGLCompressedTextureETC1(context);
26 } 26 }
27 27
28 bool WebGLCompressedTextureETC1::supported(WebGLRenderingContextBase* context) { 28 bool WebGLCompressedTextureETC1::supported(WebGLRenderingContextBase* context) {
29 Extensions3DUtil* extensionsUtil = context->extensionsUtil(); 29 Extensions3DUtil* extensionsUtil = context->extensionsUtil();
30 return extensionsUtil->supportsExtension( 30 bool webgl1 = !context->isWebGL2OrHigher();
31 "GL_OES_compressed_ETC1_RGB8_texture"); 31 bool etc1 =
32 extensionsUtil->supportsExtension("GL_OES_compressed_ETC1_RGB8_texture");
33 bool etc =
34 extensionsUtil->supportsExtension("GL_CHROMIUM_compressed_texture_etc");
35 return (webgl1 || etc) && etc1;
32 } 36 }
33 37
34 const char* WebGLCompressedTextureETC1::extensionName() { 38 const char* WebGLCompressedTextureETC1::extensionName() {
35 return "WEBGL_compressed_texture_etc1"; 39 return "WEBGL_compressed_texture_etc1";
36 } 40 }
37 41
38 } // namespace blink 42 } // namespace blink
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/webgl2_conformance_expectations.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698