Chromium Code Reviews| Index: webkit/gpu/webgraphicscontext3d_in_process_impl.cc |
| diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc |
| index 93af088a96aaef96896cf454b2ab05012a6df7d4..bdc01aa068dc56a26245d221f428103948c4d92e 100644 |
| --- a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc |
| +++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc |
| @@ -10,6 +10,7 @@ |
| #include <string> |
| #include "base/logging.h" |
| +#include "base/string_split.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" |
| @@ -1248,8 +1249,16 @@ WebString WebGraphicsContext3DInProcessImpl::getString(WGC3Denum name) { |
| // GL_CHROMIUM_copy_texture_to_parent_texture requires the |
| // desktopGL-only function glGetTexLevelParameteriv (GLES2 |
| // doesn't support it). |
|
Ken Russell (switch to Gerrit)
2011/11/04 01:18:58
Could you move this comment next to the addition o
piman
2011/11/04 01:36:30
Done.
|
| - if (!is_gles2_) |
| + if (!is_gles2_) { |
| + std::vector<std::string> split; |
| + base::SplitString(result, ' ', &split); |
| + if (std::find(split.begin(), split.end(), "GL_EXT_bgra") != split.end()) { |
| + // If we support GL_EXT_bgra, pretend we support a couple of GLES2 |
| + // extension that are a subset of it. |
| + result += " GL_EXT_texture_format_BGRA8888 GL_EXT_read_format_bgra"; |
| + } |
| result += " GL_CHROMIUM_copy_texture_to_parent_texture"; |
| + } |
| } |
| return WebString::fromUTF8(result.c_str()); |
| } |