| 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/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 | 430 |
| 431 void RealGLApi::glDrawElementsFn(GLenum mode, | 431 void RealGLApi::glDrawElementsFn(GLenum mode, |
| 432 GLsizei count, | 432 GLsizei count, |
| 433 GLenum type, | 433 GLenum type, |
| 434 const void* indices) { | 434 const void* indices) { |
| 435 if (!g_null_draw_bindings_enabled) | 435 if (!g_null_draw_bindings_enabled) |
| 436 GLApiBase::glDrawElementsFn(mode, count, type, indices); | 436 GLApiBase::glDrawElementsFn(mode, count, type, indices); |
| 437 } | 437 } |
| 438 | 438 |
| 439 void RealGLApi::glClearDepthFn(GLclampd depth) { | 439 void RealGLApi::glClearDepthFn(GLclampd depth) { |
| 440 if (driver_->fn.glClearDepthFn) { | 440 if (!version_->is_es) { |
| 441 GLApiBase::glClearDepthFn(depth); | 441 GLApiBase::glClearDepthFn(depth); |
| 442 } else { | 442 } else { |
| 443 DCHECK(driver_->fn.glClearDepthfFn); | 443 DCHECK(driver_->fn.glClearDepthfFn); |
| 444 GLApiBase::glClearDepthfFn(static_cast<GLclampf>(depth)); | 444 GLApiBase::glClearDepthfFn(static_cast<GLclampf>(depth)); |
| 445 } | 445 } |
| 446 } | 446 } |
| 447 | 447 |
| 448 void RealGLApi::glDepthRangeFn(GLclampd z_near, GLclampd z_far) { | 448 void RealGLApi::glDepthRangeFn(GLclampd z_near, GLclampd z_far) { |
| 449 if (driver_->fn.glDepthRangeFn) { | 449 if (!version_->is_es) { |
| 450 GLApiBase::glDepthRangeFn(z_near, z_far); | 450 GLApiBase::glDepthRangeFn(z_near, z_far); |
| 451 } else { | 451 } else { |
| 452 DCHECK(driver_->fn.glDepthRangefFn); |
| 452 GLApiBase::glDepthRangefFn(static_cast<GLclampf>(z_near), | 453 GLApiBase::glDepthRangefFn(static_cast<GLclampf>(z_near), |
| 453 static_cast<GLclampf>(z_far)); | 454 static_cast<GLclampf>(z_far)); |
| 454 } | 455 } |
| 455 } | 456 } |
| 456 | 457 |
| 457 void RealGLApi::InitializeFilteredExtensions() { | 458 void RealGLApi::InitializeFilteredExtensions() { |
| 458 if (disabled_exts_.size()) { | 459 if (disabled_exts_.size()) { |
| 459 filtered_exts_.clear(); | 460 filtered_exts_.clear(); |
| 460 if (WillUseGLGetStringForExtensions(this)) { | 461 if (WillUseGLGetStringForExtensions(this)) { |
| 461 filtered_exts_str_ = | 462 filtered_exts_str_ = |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 | 494 |
| 494 DebugGLApi::~DebugGLApi() {} | 495 DebugGLApi::~DebugGLApi() {} |
| 495 | 496 |
| 496 NoContextGLApi::NoContextGLApi() { | 497 NoContextGLApi::NoContextGLApi() { |
| 497 } | 498 } |
| 498 | 499 |
| 499 NoContextGLApi::~NoContextGLApi() { | 500 NoContextGLApi::~NoContextGLApi() { |
| 500 } | 501 } |
| 501 | 502 |
| 502 } // namespace gl | 503 } // namespace gl |
| OLD | NEW |