| 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_fence.h" | 5 #include "ui/gl/gl_fence.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "ui/gl/gl_bindings.h" | 8 #include "ui/gl/gl_bindings.h" |
| 9 #include "ui/gl/gl_context.h" | 9 #include "ui/gl/gl_context.h" |
| 10 | 10 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 return new GLFenceNVFence(); | 86 return new GLFenceNVFence(); |
| 87 } else if (gfx::g_GL_ARB_sync) { | 87 } else if (gfx::g_GL_ARB_sync) { |
| 88 return new GLFenceARBSync(); | 88 return new GLFenceARBSync(); |
| 89 } else { | 89 } else { |
| 90 return NULL; | 90 return NULL; |
| 91 } | 91 } |
| 92 } | 92 } |
| 93 | 93 |
| 94 // static | 94 // static |
| 95 bool GLFence::IsContextLost() { | 95 bool GLFence::IsContextLost() { |
| 96 if (!gfx::g_GL_ARB_robustness) | 96 if (!gfx::g_GL_ARB_robustness && !gfx::g_GL_EXT_robustness) |
| 97 return false; | 97 return false; |
| 98 | 98 |
| 99 if (!gfx::GLContext::GetCurrent() || | 99 if (!gfx::GLContext::GetCurrent() || |
| 100 !gfx::GLContext::GetCurrent()-> | 100 !gfx::GLContext::GetCurrent()-> |
| 101 WasAllocatedUsingARBRobustness()) | 101 WasAllocatedUsingRobustnessExtension()) |
| 102 return false; | 102 return false; |
| 103 | 103 |
| 104 GLenum status = glGetGraphicsResetStatusARB(); | 104 GLenum status = glGetGraphicsResetStatusARB(); |
| 105 return status != GL_NO_ERROR; | 105 return status != GL_NO_ERROR; |
| 106 } | 106 } |
| 107 | 107 |
| 108 } // namespace gfx | 108 } // namespace gfx |
| OLD | NEW |