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

Unified Diff: ui/gl/gl_gl_api_implementation.cc

Issue 2668753003: gl_gl_api_implemetation: DO API check instead of null fnptr checks (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_gl_api_implementation.cc
diff --git a/ui/gl/gl_gl_api_implementation.cc b/ui/gl/gl_gl_api_implementation.cc
index cc4453ea910464274308768dfb8a9dcc9e77dc71..00d756a74b11e667b03b0eca762272fff4bf76a9 100644
--- a/ui/gl/gl_gl_api_implementation.cc
+++ b/ui/gl/gl_gl_api_implementation.cc
@@ -437,7 +437,7 @@ void RealGLApi::glDrawElementsFn(GLenum mode,
}
void RealGLApi::glClearDepthFn(GLclampd depth) {
- if (driver_->fn.glClearDepthFn) {
+ if (!version_->is_es) {
GLApiBase::glClearDepthFn(depth);
} else {
DCHECK(driver_->fn.glClearDepthfFn);
@@ -446,9 +446,10 @@ void RealGLApi::glClearDepthFn(GLclampd depth) {
}
void RealGLApi::glDepthRangeFn(GLclampd z_near, GLclampd z_far) {
- if (driver_->fn.glDepthRangeFn) {
+ if (!version_->is_es) {
GLApiBase::glDepthRangeFn(z_near, z_far);
} else {
+ DCHECK(driver_->fn.glDepthRangefFn);
GLApiBase::glDepthRangefFn(static_cast<GLclampf>(z_near),
static_cast<GLclampf>(z_far));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698