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

Side by Side Diff: ui/gl/gl_fence_arb.cc

Issue 2629633003: Refactor GL bindings so there is no global GLApi or DriverGL. (Closed)
Patch Set: rebase Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « ui/gl/gl_fence.cc ('k') | ui/gl/gl_gl_api_implementation.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_arb.h" 5 #include "ui/gl/gl_fence_arb.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 void GLFenceARB::Invalidate() { 72 void GLFenceARB::Invalidate() {
73 sync_ = 0; 73 sync_ = 0;
74 } 74 }
75 75
76 void GLFenceARB::HandleClientWaitFailure() { 76 void GLFenceARB::HandleClientWaitFailure() {
77 DCHECK(GLContext::GetCurrent()); 77 DCHECK(GLContext::GetCurrent());
78 if (GLContext::GetCurrent()->WasAllocatedUsingRobustnessExtension()) { 78 if (GLContext::GetCurrent()->WasAllocatedUsingRobustnessExtension()) {
79 // This function pointer is only set if one of the robustness 79 // This function pointer is only set if one of the robustness
80 // extensions was available. 80 // extensions was available.
81 DCHECK(g_driver_gl.fn.glGetGraphicsResetStatusARBFn); 81 DCHECK(g_current_gl_driver &&
82 DCHECK(g_driver_gl.fn.glGetGraphicsResetStatusARBFn() != GL_NO_ERROR); 82 g_current_gl_driver->fn.glGetGraphicsResetStatusARBFn);
83 DCHECK(g_current_gl_driver->fn.glGetGraphicsResetStatusARBFn() !=
84 GL_NO_ERROR);
83 LOG(ERROR) << "Failed to wait for GLFence; context was lost. Error code: " 85 LOG(ERROR) << "Failed to wait for GLFence; context was lost. Error code: "
84 << GetGLErrors(); 86 << GetGLErrors();
85 } else { 87 } else {
86 // There's no provision for reporting these failures higher up the 88 // There's no provision for reporting these failures higher up the
87 // stack and thereby losing the context (or exiting the GPU 89 // stack and thereby losing the context (or exiting the GPU
88 // process) more cooperatively. Some of this code is called from 90 // process) more cooperatively. Some of this code is called from
89 // deep call stacks. Report the wait failure and crash with a log 91 // deep call stacks. Report the wait failure and crash with a log
90 // message. 92 // message.
91 LOG(FATAL) << "Failed to wait for GLFence. Error code: " << GetGLErrors(); 93 LOG(FATAL) << "Failed to wait for GLFence. Error code: " << GetGLErrors();
92 } 94 }
93 } 95 }
94 96
95 } // namespace gl 97 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_fence.cc ('k') | ui/gl/gl_gl_api_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698