Closed
Bug 593898
Opened 14 years ago
Closed 14 years ago
MOZ_ACCELERATED=1 or layers.accelerated-all does not work anymore on widget QT
Categories
(Core Graveyard :: Widget: Qt, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: romaxa, Assigned: romaxa)
References
Details
Attachments
(1 file, 2 obsolete files)
2.74 KB,
patch
|
dougt
:
review+
|
Details | Diff | Splinter Review |
After recent changes in MOZ_ACCELERATED value handler GL enabler stopped working in Qt widget.
There are 2 problems:
1) nsWindow::SetAccelerated is not called anymore (need for Qt to enable QGLWidget before GL context creation)
2) mUseAccelerated need to be set to toplevel window, otherwise..
Assignee | ||
Comment 2•14 years ago
|
||
I think we can also remove PREFS and MOZ_ACCELERATED values reading from http://mxr.mozilla.org/mozilla-central/source/widget/src/windows/nsWindow.cpp#3177
+ PRBool newAcceleratedValue = PR_FALSE;
if (disableAcceleration || safeMode)
- mUseAcceleratedRendering = PR_FALSE;
+ newAcceleratedValue = PR_FALSE;
else if (accelerateByDefault)
- mUseAcceleratedRendering = PR_TRUE;
+ newAcceleratedValue = PR_TRUE;
+
+ if (newAccelValue != mUseAcceleratedRendering)
+ SetAcceleratedRendering(newAcceleratedValue);
This doesn't seem right. You're going to override any other setting of SetAcceleratedRendering, e.g. if the window has the 'accelerated' attribute.
Can't you move whatever QGL stuff you need to do into context creation?
Assignee | ||
Comment 4•14 years ago
|
||
Attachment #472518 -
Attachment is obsolete: true
Attachment #472552 -
Flags: review?(roc)
Attachment #472518 -
Flags: review?(roc)
I think the code in nsBaseWidget::GetLayerManager that checks prefs and environment should move to SetLayerManager so that mUseAcceleratedRendering is always correct.
Then, I think you can just call GetAcceleratedRendering from nsWindow::createQWidget. Although, does that happen before we call SetAcceleratedRendering from nsXULWindow? If so, then I guess you have to give up on supporting the 'accelerated' attribute. If that's OK, then I suggest you add a call to SetAcceleratedRendering(PR_FALSE) somewhere before you call GetAcceleratedRendering to ensure that the prefs and environment are consulted.
Assignee | ||
Comment 6•14 years ago
|
||
(In reply to comment #5)
> I think the code in nsBaseWidget::GetLayerManager that checks prefs and
> environment should move to SetLayerManager so that mUseAcceleratedRendering is
SetLayerManager - it is gfx/layers code IIUC? do we really want to keep prefs check code there?
> Then, I think you can just call GetAcceleratedRendering from
> nsWindow::createQWidget. Although, does that happen before we call
GetAcceleratedRendering - just return mUseAcceleratedRendering right now.
and someone should call SetAcceleratedRendering to set that as true.
Assignee | ||
Comment 7•14 years ago
|
||
Ok MOZ_ACCELERATED stuff has been fixed...
And now we only need to enable QGLWidget with Qt GL context when MOZ_ACCELERATED==1
Attachment #472552 -
Attachment is obsolete: true
Attachment #475266 -
Flags: review?(doug.turner)
Attachment #472552 -
Flags: review?(roc)
Comment 8•14 years ago
|
||
Comment on attachment 475266 [details] [diff] [review]
Simple version
plz add a comment above the test.
no need to set Qt::WA_PaintOnScreen or Qt::WA_NoSystemBackground on the widget?
Assignee | ||
Comment 9•14 years ago
|
||
no, Qt::WA flags are not needed anymore
Updated•14 years ago
|
Attachment #475266 -
Flags: review?(doug.turner) → review+
Assignee | ||
Comment 11•14 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
•