Closed
Bug 594892
Opened 14 years ago
Closed 14 years ago
call MakeCurrent after a widget is resized
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
People
(Reporter: vlad, Assigned: vlad)
Details
Attachments
(1 file)
6.21 KB,
patch
|
joe
:
review+
|
Details | Diff | Splinter Review |
We may not need to do this, but after a widget is resized we should really make a real call to MakeCurrent; some platforms need this to notice that they widget's size changed. In a lot of our code we're currently always calling MakeCurrent; this might be a performance win to get rid of this, like we do in the win32 code. (Also adds some misc code in the WGL context for double buffered contexts, which we don't create, but we could.)
Attachment #473652 -
Flags: review?(joe)
Comment 1•14 years ago
|
||
Comment on attachment 473652 [details] [diff] [review] call makecurrent on resize >@@ -518,6 +507,18 @@ LayerManagerOGL::Render() > if (rect.width == 0 || rect.height == 0) > return; > >+ // If the widget size changed, we have to force a MakeCurrent >+ // to make sure that GL sees the updated widget size. >+ if (mWidgetSize.width != width || >+ mWidgetSize.height != height) >+ { >+ MakeCurrent(PR_TRUE); >+ mWidgetSize.width = width; >+ mWidgetSize.height = height; >+ } else { >+ MakeCurrent(); >+ } Shouldn't we do this in SetupBackBuffer instead?
Attachment #473652 -
Flags: review?(joe) → review+
Assignee | ||
Comment 2•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/46c0a7c9e4f5 We could, doesn't really matter -- if we did it in SeupBackubuffer then we'd have to call MakeCurrent twice. We can do some cleanup of this code in a followup.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•