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

Issue 16894002: Unset GL Api when releasing a context. (Closed)

Created:
7 years, 6 months ago by no sievers
Modified:
5 years, 2 months ago
Reviewers:
greggman
CC:
chromium-reviews, jonathan.backer, epenner
Visibility:
Public.

Description

Unset GL Api when releasing a context. This allows for catching errors when making GL calls without a context current. Also make the current GL API a per-thread value which fixes potential problems esp. when using virtual contexts (imagine using real GL contexts on one thread while using virtual contexts on the GPU thread. Both might now fight over g_current_gl_context). Since the platform APIs will commonly fail if you try to make a context current when it's already current on another thread, we should never end up with one API current on multiple threads (as long as we reset the GL api in all MakeCurrent failure paths, which this patch also does). BUG=248957

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -4 lines) Patch
M ui/gl/gl_bindings.h View 2 chunks +5 lines, -1 line 1 comment Download
M ui/gl/gl_context.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M ui/gl/gl_context_cgl.cc View 1 chunk +1 line, -0 lines 0 comments Download
M ui/gl/gl_context_egl.cc View 1 chunk +1 line, -0 lines 0 comments Download
M ui/gl/gl_context_osmesa.cc View 1 chunk +1 line, -0 lines 0 comments Download
M ui/gl/gl_context_wgl.cc View 1 chunk +1 line, -0 lines 0 comments Download
M ui/gl/gl_gl_api_implementation.cc View 2 chunks +1 line, -2 lines 0 comments Download
M ui/gl/gl_implementation.cc View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
no sievers
https://codereview.chromium.org/16894002/diff/1/ui/gl/gl_bindings.h File ui/gl/gl_bindings.h (right): https://codereview.chromium.org/16894002/diff/1/ui/gl/gl_bindings.h#newcode290 ui/gl/gl_bindings.h:290: #define g_current_gl_context g_current_gl_context_tls.Pointer()->Get() I did this hack for the ...
7 years, 6 months ago (2013-06-12 23:34:59 UTC) #1
greggman
7 years, 6 months ago (2013-06-13 20:50:12 UTC) #2
lgtm

Powered by Google App Engine
This is Rietveld 408576698