OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/gl/gl_gl_api_implementation.h" | 5 #include "ui/gl/gl_gl_api_implementation.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 break; | 210 break; |
211 default: | 211 default: |
212 break; | 212 break; |
213 } | 213 } |
214 } | 214 } |
215 | 215 |
216 return gl_format; | 216 return gl_format; |
217 } | 217 } |
218 | 218 |
219 static inline GLenum GetTexType(GLenum type) { | 219 static inline GLenum GetTexType(GLenum type) { |
220 if (GetGLImplementation() != kGLImplementationEGLGLES2) { | 220 if (!g_version_info->is_es) { |
221 if (type == GL_HALF_FLOAT_OES) | 221 if (type == GL_HALF_FLOAT_OES) |
222 return GL_HALF_FLOAT_ARB; | 222 return GL_HALF_FLOAT_ARB; |
223 } | 223 } |
224 return type; | 224 return type; |
225 } | 225 } |
226 | 226 |
227 static void GL_BINDING_CALL CustomTexImage2D( | 227 static void GL_BINDING_CALL CustomTexImage2D( |
228 GLenum target, GLint level, GLint internalformat, | 228 GLenum target, GLint level, GLint internalformat, |
229 GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, | 229 GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, |
230 const void* pixels) { | 230 const void* pixels) { |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 TraceGLApi::~TraceGLApi() { | 568 TraceGLApi::~TraceGLApi() { |
569 } | 569 } |
570 | 570 |
571 NoContextGLApi::NoContextGLApi() { | 571 NoContextGLApi::NoContextGLApi() { |
572 } | 572 } |
573 | 573 |
574 NoContextGLApi::~NoContextGLApi() { | 574 NoContextGLApi::~NoContextGLApi() { |
575 } | 575 } |
576 | 576 |
577 } // namespace gl | 577 } // namespace gl |
OLD | NEW |