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

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

Issue 2363773007: Command buffer should not report depth_texture on pure ES3 without depth_texture extension. (Closed)
Patch Set: fix unittests Created 4 years, 2 months 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/texture_manager.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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } 48 }
49 49
50 bool WebGLDepthTexture::supported(WebGLRenderingContextBase* context) 50 bool WebGLDepthTexture::supported(WebGLRenderingContextBase* context)
51 { 51 {
52 Extensions3DUtil* extensionsUtil = context->extensionsUtil(); 52 Extensions3DUtil* extensionsUtil = context->extensionsUtil();
53 // Emulating the UNSIGNED_INT_24_8_WEBGL texture internal format in terms 53 // Emulating the UNSIGNED_INT_24_8_WEBGL texture internal format in terms
54 // of two separate texture objects is too difficult, so disable depth 54 // of two separate texture objects is too difficult, so disable depth
55 // textures unless a packed depth/stencil format is available. 55 // textures unless a packed depth/stencil format is available.
56 if (!extensionsUtil->supportsExtension("GL_OES_packed_depth_stencil")) 56 if (!extensionsUtil->supportsExtension("GL_OES_packed_depth_stencil"))
57 return false; 57 return false;
58 return extensionsUtil->supportsExtension("GL_CHROMIUM_depth_texture") 58 return extensionsUtil->supportsExtension("GL_CHROMIUM_depth_texture");
59 || extensionsUtil->supportsExtension("GL_OES_depth_texture")
60 || extensionsUtil->supportsExtension("GL_ARB_depth_texture");
61 } 59 }
62 60
63 const char* WebGLDepthTexture::extensionName() 61 const char* WebGLDepthTexture::extensionName()
64 { 62 {
65 return "WEBGL_depth_texture"; 63 return "WEBGL_depth_texture";
66 } 64 }
67 65
68 } // namespace blink 66 } // namespace blink
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/texture_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698