| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, | 204 GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, |
| 205 GLsizei height) { | 205 GLsizei height) { |
| 206 GLenum gl_internal_format = GetInternalFormat(internalformat); | 206 GLenum gl_internal_format = GetInternalFormat(internalformat); |
| 207 g_driver_gl.orig_fn.glRenderbufferStorageMultisampleEXTFn( | 207 g_driver_gl.orig_fn.glRenderbufferStorageMultisampleEXTFn( |
| 208 target, samples, gl_internal_format, width, height); | 208 target, samples, gl_internal_format, width, height); |
| 209 } | 209 } |
| 210 | 210 |
| 211 } // anonymous namespace | 211 } // anonymous namespace |
| 212 | 212 |
| 213 void DriverGL::InitializeCustomDynamicBindings(GLContext* context) { | 213 void DriverGL::InitializeCustomDynamicBindings(GLContext* context) { |
| 214 InitializeDynamicBindings(context); | 214 InitializeDynamicBindings(context, g_real_gl->DisabledExtensions()); |
| 215 | 215 |
| 216 DCHECK(orig_fn.glTexImage2DFn == NULL); | 216 DCHECK(orig_fn.glTexImage2DFn == NULL); |
| 217 orig_fn.glTexImage2DFn = fn.glTexImage2DFn; | 217 orig_fn.glTexImage2DFn = fn.glTexImage2DFn; |
| 218 fn.glTexImage2DFn = | 218 fn.glTexImage2DFn = |
| 219 reinterpret_cast<glTexImage2DProc>(CustomTexImage2D); | 219 reinterpret_cast<glTexImage2DProc>(CustomTexImage2D); |
| 220 | 220 |
| 221 DCHECK(orig_fn.glTexSubImage2DFn == NULL); | 221 DCHECK(orig_fn.glTexSubImage2DFn == NULL); |
| 222 orig_fn.glTexSubImage2DFn = fn.glTexSubImage2DFn; | 222 orig_fn.glTexSubImage2DFn = fn.glTexSubImage2DFn; |
| 223 fn.glTexSubImage2DFn = | 223 fn.glTexSubImage2DFn = |
| 224 reinterpret_cast<glTexSubImage2DProc>(CustomTexSubImage2D); | 224 reinterpret_cast<glTexSubImage2DProc>(CustomTexSubImage2D); |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 ScopedSetGLToRealGLApi::ScopedSetGLToRealGLApi() | 609 ScopedSetGLToRealGLApi::ScopedSetGLToRealGLApi() |
| 610 : old_gl_api_(GetCurrentGLApi()) { | 610 : old_gl_api_(GetCurrentGLApi()) { |
| 611 SetGLToRealGLApi(); | 611 SetGLToRealGLApi(); |
| 612 } | 612 } |
| 613 | 613 |
| 614 ScopedSetGLToRealGLApi::~ScopedSetGLToRealGLApi() { | 614 ScopedSetGLToRealGLApi::~ScopedSetGLToRealGLApi() { |
| 615 SetGLApi(old_gl_api_); | 615 SetGLApi(old_gl_api_); |
| 616 } | 616 } |
| 617 | 617 |
| 618 } // namespace gfx | 618 } // namespace gfx |
| OLD | NEW |