WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
56555
[Qt] Enable GraphicsContext3D only when the window surface support OpenGL
https://bugs.webkit.org/show_bug.cgi?id=56555
Summary
[Qt] Enable GraphicsContext3D only when the window surface support OpenGL
Jarkko Sakkinen
Reported
2011-03-17 02:56:20 PDT
This bug was cause by this change:
https://bugs.webkit.org/show_bug.cgi?id=56339
Viewport widget should not be stored into member variable because it might not stay valid for the full life-cycle of GraphicsContext3D.
Attachments
Bug fix. See the ChangeLog entry for more verbose description.
(6.13 KB, patch)
2011-03-17 04:21 PDT
,
Jarkko Sakkinen
benjamin
: review-
Details
Formatted Diff
Diff
Revised fix. Allows software fallback.
(4.76 KB, patch)
2011-03-17 05:14 PDT
,
Jarkko Sakkinen
no flags
Details
Formatted Diff
Diff
Fixed indentation
(4.73 KB, patch)
2011-03-17 09:23 PDT
,
Jarkko Sakkinen
benjamin
: review-
Details
Formatted Diff
Diff
Fixed rest of the indentations.
(4.68 KB, patch)
2011-03-17 10:16 PDT
,
Jarkko Sakkinen
no flags
Details
Formatted Diff
Diff
Check AC on creation of WebGLRenderingContext
(5.08 KB, patch)
2011-03-17 23:06 PDT
,
Jarkko Sakkinen
kenneth
: review+
Details
Formatted Diff
Diff
Removed unnecessary new line character
(1.75 KB, patch)
2011-03-18 02:16 PDT
,
Jarkko Sakkinen
no flags
Details
Formatted Diff
Diff
Mistake in taking diff in last submit
(5.08 KB, patch)
2011-03-18 02:17 PDT
,
Jarkko Sakkinen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Jarkko Sakkinen
Comment 1
2011-03-17 04:21:18 PDT
Created
attachment 86043
[details]
Bug fix. See the ChangeLog entry for more verbose description.
Jarkko Sakkinen
Comment 2
2011-03-17 04:23:24 PDT
Adding Simon and Benjamin to CC list because this in a way related to:
https://bugs.webkit.org/show_bug.cgi?id=40884
After some thinking I completely support your choice of not supporting any kind of software fallback at this point.
Benjamin Poulain
Comment 3
2011-03-17 04:42:03 PDT
What about printing? Or rendering a particular frame to QImage? Wouldn't that disable the GraphicsContext3D for the following painting call?
Jarkko Sakkinen
Comment 4
2011-03-17 04:52:33 PDT
You're right. In order to support those cases software fallback *is* needed. *Also*, there should be a check before allowing texture mapping in GraphicsContext3DImpl::paint() that painter->paintDevice() == m_viewportGLWidget. If not use software fallback. I think, because of cases that you mentioned, you should reconsider reopening 40884 (QImage and printing). I'll revise this patch.
Benjamin Poulain
Comment 5
2011-03-17 05:11:41 PDT
Comment on
attachment 86043
[details]
Bug fix. See the ChangeLog entry for more verbose description. I do not mind updating 40884. Rejecting this for now.
Jarkko Sakkinen
Comment 6
2011-03-17 05:14:12 PDT
Created
attachment 86048
[details]
Revised fix. Allows software fallback.
Benjamin Poulain
Comment 7
2011-03-17 05:48:11 PDT
Comment on
attachment 86048
[details]
Revised fix. Allows software fallback. Quick comment from a quick look: we are not limiting lines to 80 characters in WebKit, you don't have to split everything like this: PageClientQWidget* webPageClient = static_cast<PageClientQWidget*>(m_hostWindow->platformPageClient());
Jarkko Sakkinen
Comment 8
2011-03-17 09:23:36 PDT
Created
attachment 86062
[details]
Fixed indentation
Jarkko Sakkinen
Comment 9
2011-03-17 09:28:53 PDT
Fixed indentation. This fixes now two issues: - Crash does not occur when viewport is switched. - Does only texture mapping if painter is associated to the viewport QGLWidget. These are anyway valid fixes. Let's scope software fallback discussion out of this bug :)
Benjamin Poulain
Comment 10
2011-03-17 09:41:11 PDT
Comment on
attachment 86062
[details]
Fixed indentation View in context:
https://bugs.webkit.org/attachment.cgi?id=86062&action=review
> Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:474 > + PageClientQWidget* webPageClient > + = static_cast<PageClientQWidget*>(m_hostWindow->platformPageClient());
This should be on one line.
> Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:488 > + PageClientQWidget* webPageClient > + = static_cast<PageClientQWidget*>(m_hostWindow->platformPageClient());
This should be on one line.
> Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:504 > + QGLWidget* viewportGLWidget = getViewportGLWidget(); > + if (testAcceleratedCompositing() > + && viewportGLWidget > + && viewportGLWidget == m_viewportGLWidget > + && viewportGLWidget == painter->device()) {
I would put those test as the first statements of the functions, and return if not true. That way it is clear, if the initial condition are not correct, just return.
Benjamin Poulain
Comment 11
2011-03-17 09:41:43 PDT
I r- just for style issues, the patch looks good to me otherwise.
Benjamin Poulain
Comment 12
2011-03-17 09:47:45 PDT
Comment on
attachment 86062
[details]
Fixed indentation Thinking abou it... Aren't the static_cast<PageClientQWidget*> wrong? You should use QWebPageClient. The return value of m_hostWindow->platformPageClient() is gonna be PageClientQGraphicsWidget for QGraphicsWebView.
Jarkko Sakkinen
Comment 13
2011-03-17 10:16:28 PDT
Created
attachment 86066
[details]
Fixed rest of the indentations. After that last if-statement that you commented comes the software fallback. Therefore, it is handled that way.
Jarkko Sakkinen
Comment 14
2011-03-17 23:06:14 PDT
Created
attachment 86138
[details]
Check AC on creation of WebGLRenderingContext See the ChangeLog entry for description.
Kenneth Rohde Christiansen
Comment 15
2011-03-18 02:00:18 PDT
Comment on
attachment 86138
[details]
Check AC on creation of WebGLRenderingContext View in context:
https://bugs.webkit.org/attachment.cgi?id=86138&action=review
> Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:469 > + QWebPageClient* webPageClient = m_hostWindow->platformPageClient(); > + > + QAbstractScrollArea* scrollArea = qobject_cast<QAbstractScrollArea*>(webPageClient->ownerWidget());
I would remove that unneeded newline
> Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:472 > + if (scrollArea) > + return qobject_cast<QGLWidget*>(scrollArea->viewport());
Doesn't casting 0 return a 0? Just wondered if you could do "return qobject..."
Jarkko Sakkinen
Comment 16
2011-03-18 02:11:10 PDT
The pointer scrollArea might be NULL. If it were, then scrollArea->viewport() would cause SEGFAULT.
Jarkko Sakkinen
Comment 17
2011-03-18 02:16:21 PDT
Created
attachment 86149
[details]
Removed unnecessary new line character
Jarkko Sakkinen
Comment 18
2011-03-18 02:17:53 PDT
Created
attachment 86150
[details]
Mistake in taking diff in last submit
WebKit Commit Bot
Comment 19
2011-03-18 07:28:21 PDT
Comment on
attachment 86150
[details]
Mistake in taking diff in last submit Clearing flags on attachment: 86150 Committed
r81468
: <
http://trac.webkit.org/changeset/81468
>
WebKit Commit Bot
Comment 20
2011-03-18 07:28:27 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug