Skip to content

Commit 81b06b8

Browse files
committed
Revert "Fix crash in WGL context creation"
This reverts commit 777b046. Change-Id: I37693134991a6036a27b58ab2b9b9e5542b0feae Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/595114 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
1 parent 67da45a commit 81b06b8

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

chromium/ui/gl/generate_bindings.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@
4343
function. This may happen for example when functions
4444
are added to a new version of an extension, but the
4545
extension string is not modified.
46-
check_for_nullptr: Workaround for QTBUG-124370. Adds a check that ensures
47-
the function has been bound already.
4846
By default, the function gets its name from the first name in its names or
4947
versions array. This can be overridden by supplying a 'known_as' key.
5048
@@ -2982,8 +2980,7 @@
29822980
'arguments': 'HDC hdc', },
29832981
{ 'return_type': 'HGLRC',
29842982
'names': ['wglCreateContextAttribsARB'],
2985-
'arguments': 'HDC hDC, HGLRC hShareContext, const int* attribList',
2986-
'check_for_nullptr': True, },
2983+
'arguments': 'HDC hDC, HGLRC hShareContext, const int* attribList', },
29872984
{ 'return_type': 'HGLRC',
29882985
'names': ['wglCreateLayerContext'],
29892986
'arguments': 'HDC hdc, int iLayerPlane', },
@@ -3730,12 +3727,8 @@ def MakeArgNames(arguments):
37303727
file.write(' driver_->fn.%sFn(%s);\n' %
37313728
(function_name, argument_names))
37323729
else:
3733-
if ('check_for_nullptr' in func):
3734-
file.write(' return driver_->fn.%sFn ?\n driver_->fn.%sFn(%s)\n : nullptr;\n' %
3735-
(function_name, function_name, argument_names))
3736-
else:
3737-
file.write(' return driver_->fn.%sFn(%s);\n' %
3738-
(function_name, argument_names))
3730+
file.write(' return driver_->fn.%sFn(%s);\n' %
3731+
(function_name, argument_names))
37393732
file.write('}\n')
37403733

37413734
# Write TraceGLApi functions

chromium/ui/gl/gl_bindings_autogen_wgl.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,8 @@ HGLRC WGLApiBase::wglCreateContextFn(HDC hdc) {
124124
HGLRC WGLApiBase::wglCreateContextAttribsARBFn(HDC hDC,
125125
HGLRC hShareContext,
126126
const int* attribList) {
127-
return driver_->fn.wglCreateContextAttribsARBFn
128-
? driver_->fn.wglCreateContextAttribsARBFn(hDC, hShareContext,
129-
attribList)
130-
: nullptr;
127+
return driver_->fn.wglCreateContextAttribsARBFn(hDC, hShareContext,
128+
attribList);
131129
}
132130

133131
HGLRC WGLApiBase::wglCreateLayerContextFn(HDC hdc, int iLayerPlane) {

0 commit comments

Comments
 (0)