Closed
Bug 560537
Opened 15 years ago
Closed 15 years ago
Implement Top level GL layer manager for Qt widget port
Categories
(Core Graveyard :: Widget: Qt, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: romaxa, Assigned: romaxa)
Details
Attachments
(4 files, 10 obsolete files)
10.51 KB,
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
7.53 KB,
patch
|
bas.schouten
:
review+
|
Details | Diff | Splinter Review |
4.47 KB,
patch
|
bas.schouten
:
review+
|
Details | Diff | Splinter Review |
1.90 KB,
patch
|
bas.schouten
:
review+
|
Details | Diff | Splinter Review |
If I understood correctly, to make Qt widget rendering with GL accelerated layers we should have:
1) QGLWidget backend enabled for toplevel QGraphicsView.
2) Add some detection for accelerated mode (MOZ_QT_GL=1)
3) Fix glContext wrappers (gfx/layers/opengl) when MOZ_WIDGET_QT defined, and make sure that it works and does not conflict with QT gl context.
I'll add some simple QGLWidget enabler, and layers automanager setup.
The rest of work need to be done later.
Fix me if I'm wrong here.
Assignee | ||
Comment 1•15 years ago
|
||
Assignee | ||
Comment 2•15 years ago
|
||
Assignee: nobody → romaxa
Attachment #440221 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #449245 -
Flags: review?(dougt)
Assignee | ||
Comment 3•15 years ago
|
||
Attachment #449245 -
Attachment is obsolete: true
Attachment #449295 -
Flags: review?(dougt)
Attachment #449245 -
Flags: review?(dougt)
Updated•15 years ago
|
Attachment #449295 -
Flags: review?(dougt) → review?(joe)
Assignee | ||
Comment 4•15 years ago
|
||
Use platform optimized offscreen for widget cached buffer surface
Assignee | ||
Comment 5•15 years ago
|
||
With GL rendering I think we don't want offscreen buffer anymore, and default target for layer manager should be QWidget - XWindow.
Comment 6•15 years ago
|
||
Comment on attachment 449295 [details] [diff] [review]
Better patch
Bas should look at this too. In particular I'm not sure about DoPaint - don't we need an AutoLayerManagerSetup in the LAYERS_OPENGL path?
Attachment #449295 -
Flags: superreview?(bas.schouten)
Attachment #449295 -
Flags: review?(joe)
Attachment #449295 -
Flags: review+
Comment 7•15 years ago
|
||
(In reply to comment #6)
> (From update of attachment 449295 [details] [diff] [review])
> Bas should look at this too. In particular I'm not sure about DoPaint - don't
> we need an AutoLayerManagerSetup in the LAYERS_OPENGL path?
We do not, AutoLayerManagerSetup is only for BasicLayerManagers. Its results are even unpredictable for others since it will just static_cast to BasicLayerManager*.
Assignee | ||
Updated•15 years ago
|
Attachment #449637 -
Flags: review?(joe)
Assignee | ||
Comment 8•15 years ago
|
||
Comment on attachment 449639 [details] [diff] [review]
Add DIRECT_X rendering mode, for GL layers rendering
Make rendering mode directly to QWidget (XSurface), and allow to avoid memory copy
Attachment #449639 -
Flags: review?(joe)
Comment 9•15 years ago
|
||
Comment on attachment 449637 [details] [diff] [review]
Switch offscreen buffer creation to platform->CreateOffscreenSurface
I like this patch a lot.
Attachment #449637 -
Flags: review?(joe) → review+
Updated•15 years ago
|
Attachment #449639 -
Flags: review?(joe) → review+
Assignee | ||
Comment 10•15 years ago
|
||
Comment on attachment 449637 [details] [diff] [review]
Switch offscreen buffer creation to platform->CreateOffscreenSurface
This patch moved to separate bug 571431
Assignee | ||
Comment 11•15 years ago
|
||
Attachment #449295 -
Attachment is obsolete: true
Attachment #449637 -
Attachment is obsolete: true
Attachment #449639 -
Attachment is obsolete: true
Attachment #449295 -
Flags: superreview?(bas.schouten)
Assignee | ||
Comment 12•15 years ago
|
||
Attachment #450987 -
Flags: review?(joe)
Assignee | ||
Comment 13•15 years ago
|
||
For Qt we have multiple QGraphicsWidget's but all of them painted to the same X-Window (QGraphicsView viewport).
It is easier to create GLContext using Qt API, and adopt it to mozilla::gl provider code.
Attachment #450630 -
Attachment is obsolete: true
Attachment #450988 -
Flags: review?(joe)
Assignee | ||
Comment 14•15 years ago
|
||
Attachment #450988 -
Attachment is obsolete: true
Attachment #451488 -
Flags: review?(joe)
Attachment #450988 -
Flags: review?(joe)
Assignee | ||
Comment 15•15 years ago
|
||
Less QT ifdefs for QT-GL context creation.
Attachment #450987 -
Attachment is obsolete: true
Attachment #451554 -
Flags: review?(joe)
Attachment #450987 -
Flags: review?(joe)
Comment 16•15 years ago
|
||
Comment on attachment 451488 [details] [diff] [review]
Updated to trunk, fixed conflicts with GL/QGL defines, works fine on maemo device
>diff -r 7f9aa069f7b4 widget/src/qt/nsWindow.cpp
>+#define GLfloat GLdouble
>+#define GLdouble GLfloat
This looks very wrong.
Other than that looks ok though.
Attachment #451488 -
Flags: review?(joe) → review-
Comment 17•15 years ago
|
||
Comment on attachment 451554 [details] [diff] [review]
Make EGL provider use GL context created by Qt
>diff -r b48e3441abcb gfx/thebes/src/GLContextProviderEGL.cpp
>+#define GLfloat GLdouble
>+#define GLdouble GLfloat
This looks very wrong.
> ~GLContextEGL()
> {
>+ // If mGLWidget defined then Widget owning GL context
"If mGLWidget is non-null, then we've been given it by the GL context provider, and it's managed by the widget implementation. In this case, We can't destroy our contexts."
>+ if (mGLWidget)
>+ return;
>+
> sEGLLibrary.fDestroyContext(mDisplay, mContext);
> sEGLLibrary.fDestroySurface(mDisplay, mSurface);
While you're in here, can you fix the indentation of those two lines?
> }
> already_AddRefed<GLContext>
> GLContextProvider::CreateForWindow(nsIWidget *aWidget)
>+ // All Qt nsIWidget's have the same X-Window surface
>+ // And EGL not allowing to create multiple GL context for the same window
>+ // we should be able to create GL context for QGV viewport once, and reuse it for all child widgets
>+ NS_ERROR("Need special GLContext implementation for QT widgets structure");
This should probably be an NS_RUNTIME_ABORT, unless we're sure that returning nsnull from this function will be handled properly.
>+ return nsnull;
Attachment #451554 -
Flags: review?(joe) → review-
Assignee | ||
Comment 18•15 years ago
|
||
>
> >+ if (mGLWidget)
> >+ return;
> >+
> > sEGLLibrary.fDestroyContext(mDisplay, mContext);
> > sEGLLibrary.fDestroySurface(mDisplay, mSurface);
>
> While you're in here, can you fix the indentation of those two lines?
probably it is better to attach another patch which is fixing only indent for this file.
> >+ NS_ERROR("Need special GLContext implementation for QT widgets structure");
>
> This should probably be an NS_RUNTIME_ABORT, unless we're sure that returning
> nsnull from this function will be handled properly.
>
> >+ return nsnull;
returning nsnull for this function will switch to software rendering, and nothing serious should happen..
Assignee | ||
Comment 19•15 years ago
|
||
Attachment #451488 -
Attachment is obsolete: true
Attachment #452799 -
Flags: review?(bas.schouten)
Assignee | ||
Comment 20•15 years ago
|
||
Attachment #452800 -
Flags: review?(bas.schouten)
Assignee | ||
Comment 21•15 years ago
|
||
Attachment #451554 -
Attachment is obsolete: true
Assignee | ||
Updated•15 years ago
|
Attachment #452801 -
Flags: review?(bas.schouten)
Assignee | ||
Comment 22•15 years ago
|
||
Attachment #452948 -
Flags: review?(bas.schouten)
Updated•15 years ago
|
Attachment #452948 -
Flags: review?(bas.schouten) → review+
Comment 23•15 years ago
|
||
Comment on attachment 452801 [details] [diff] [review]
Updated to fixed indent, fixed joe comments
Please take into account that a GLContext can theoretically outlive its Widget.
Attachment #452801 -
Flags: review?(bas.schouten) → review+
Comment 24•15 years ago
|
||
Comment on attachment 452800 [details] [diff] [review]
Fix indent for EGL provider
I believe indentation fixes don't require review :-) But this looks good to me!
Attachment #452800 -
Flags: review?(bas.schouten) → review+
Comment 25•15 years ago
|
||
I'm not a peer for widget so I'm not quite sure if I should be reviewing the widget patch!
Assignee | ||
Updated•15 years ago
|
Attachment #452799 -
Flags: review?(bas.schouten) → review?(vladimir)
Comment on attachment 452799 [details] [diff] [review]
Qt Top level GL, fixed review comments
don't really know much qt these days, but this looks ok
Attachment #452799 -
Flags: review?(vladimir) → review+
Assignee | ||
Updated•15 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 27•15 years ago
|
||
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•