Closed
Bug 1250840
Opened 8 years ago
Closed 8 years ago
Redefinition of "class mozilla::gl::GLContextProvider"
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: kuoe0.tw, Assigned: jerry)
Details
(Whiteboard: [gfx-noted])
Attachments
(2 files, 2 obsolete files)
1.78 KB,
patch
|
jerry
:
feedback-
|
Details | Diff | Splinter Review |
3.58 KB,
patch
|
Details | Diff | Splinter Review |
I think it should be wrapped by #define something in [1]. When we define "MOZ_GL_PROVIDER" to "GLContextProviderEGL" in [2]. It causes the redefinition error of "class GL_CONTEXT_PROVIDER_NAME" in GLContextProviderImpl.h. [1]: https://dxr.mozilla.org/mozilla-central/source/gfx/gl/GLContextProvider.h#49-54 [2]: https://dxr.mozilla.org/mozilla-central/source/gfx/gl/GLContextProvider.h#65-70
Reporter | ||
Comment 1•8 years ago
|
||
Hi Jerry, can you give some feedback on this patch? Or, if you think there is someone suitable for feedback, can you forward it to him/her? I found the define warp is removed in Bug 1191042. So I think we should add the wrap back. And I also add a define wrap for "GL_CONTEXT_PROVIDER_DEFAULT" in [1]. [1]: https://dxr.mozilla.org/mozilla-central/source/gfx/gl/GLContextProvider.h#69
Assignee: nobody → kuoe0
Attachment #8722943 -
Flags: feedback?(hshih)
Assignee | ||
Comment 2•8 years ago
|
||
Comment on attachment 8722943 [details] [diff] [review] Bug-1250840-hg.patch Review of attachment 8722943 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/gl/GLContextProvider.h @@ +47,5 @@ > #endif > > +#if defined(ANDROID) || defined(XP_WIN) > + #define GL_CONTEXT_PROVIDER_NAME GLContextProviderEGL > + #include "GLContextProviderImpl.h" If this is android platform and we define the MOZ_GL_PROVIDER as GLContextProviderEGL, we still create two class named GLContextProviderEGL.
Attachment #8722943 -
Flags: feedback?(hshih) → feedback-
Assignee | ||
Comment 3•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Attachment #8722983 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 4•8 years ago
|
||
Comment on attachment 8722983 [details] [diff] [review] handle the redefinition of gl context provider. Review of attachment 8722983 [details] [diff] [review]: ----------------------------------------------------------------- There is a redefinition problem when we set MOZ_GL_PROVIDER as the same type as the provider we already have. I assume we only have one provider. If we already have one, we will just ignore others. Then, make MOZ_GL_PROVIDER as the first priority.
Reporter | ||
Updated•8 years ago
|
Assignee: kuoe0 → nobody
Updated•8 years ago
|
Whiteboard: [gfx-noted]
Comment 5•8 years ago
|
||
Comment on attachment 8722983 [details] [diff] [review] handle the redefinition of gl context provider. Review of attachment 8722983 [details] [diff] [review]: ----------------------------------------------------------------- It looks like this stops us from defining both providers on X11. Is that intentional?
Assignee | ||
Comment 6•8 years ago
|
||
(In reply to Jeff Muizelaar [:jrmuizel] from comment #5) > Comment on attachment 8722983 [details] [diff] [review] > handle the redefinition of gl context provider. > > Review of attachment 8722983 [details] [diff] [review]: > ----------------------------------------------------------------- > > It looks like this stops us from defining both providers on X11. Is that > intentional? Yes, I assume we only have one provider. Will we have multiple providers on X11(not including the default GLContextProviderNull provider)?
Flags: needinfo?(jmuizelaar)
Comment 7•8 years ago
|
||
(In reply to Jerry Shih[:jerry] (UTC+8) from comment #6) > (In reply to Jeff Muizelaar [:jrmuizel] from comment #5) > > Comment on attachment 8722983 [details] [diff] [review] > > handle the redefinition of gl context provider. > > > > Review of attachment 8722983 [details] [diff] [review]: > > ----------------------------------------------------------------- > > > > It looks like this stops us from defining both providers on X11. Is that > > intentional? > > Yes, I assume we only have one provider. > Will we have multiple providers on X11(not including the default > GLContextProviderNull provider)? I think we do have multiple providers on X11...
Flags: needinfo?(jmuizelaar)
Assignee | ||
Comment 8•8 years ago
|
||
Export current provider def in configure.in and check it to prevent the redefinition problem.
Attachment #8726645 -
Flags: review?(jmuizelaar)
Assignee | ||
Updated•8 years ago
|
Attachment #8722983 -
Attachment is obsolete: true
Attachment #8722983 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 9•8 years ago
|
||
Comment on attachment 8726645 [details] [diff] [review] handle the redefinition of gl context provider. v2 Review of attachment 8726645 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/gl/GLContextProvider.h @@ +36,2 @@ > #ifdef XP_WIN > + #ifndef MOZ_GLContextProviderWGL Please check old-configure.in
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → hshih
Status: NEW → ASSIGNED
Assignee | ||
Updated•8 years ago
|
Attachment #8726645 -
Attachment is obsolete: true
Attachment #8726645 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 11•8 years ago
|
||
Comment on attachment 8732868 [details] [diff] [review] handle the redefinition of gl context provider. v3 Review of attachment 8732868 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/gl/GLContextProvider.h @@ +34,2 @@ > #ifdef XP_WIN > + #ifndef GL_PROVIDER_WGL Use the def from [1] to prevent the redefinition problem when we set the provider as that we already have. [1] https://hg.mozilla.org/mozilla-central/annotate/f14898695ee0dd14615914f3e1401f17df57fdd7/toolkit/moz.configure#l180
Comment 12•8 years ago
|
||
(In reply to Tommy Kuo [:KuoE0] from comment #0) > I think it should be wrapped by #define something in [1]. > > When we define "MOZ_GL_PROVIDER" to "GLContextProviderEGL" in [2]. It causes > the redefinition error of "class GL_CONTEXT_PROVIDER_NAME" in > GLContextProviderImpl.h. Why do you want to do this? It is preferable to not 'fix' anything here if there's no good reason to want to do this.
Flags: needinfo?(kuoe0)
Assignee | ||
Comment 13•8 years ago
|
||
(In reply to Jeff Gilbert [:jgilbert] from comment #12) > (In reply to Tommy Kuo [:KuoE0] from comment #0) > > I think it should be wrapped by #define something in [1]. > > > > When we define "MOZ_GL_PROVIDER" to "GLContextProviderEGL" in [2]. It causes > > the redefinition error of "class GL_CONTEXT_PROVIDER_NAME" in > > GLContextProviderImpl.h. > > Why do you want to do this? It is preferable to not 'fix' anything here if > there's no good reason to want to do this. If we have ac_option --with-gl-provider=EGL, we will hit the problem. I think it's fine to add the option even we already use that.
Flags: needinfo?(kuoe0) → needinfo?(jgilbert)
Comment 14•8 years ago
|
||
I do not think that's useful enough to warrant the extra complexity going into this already-gross file. Unless there's a reason to have this, I'm going to WONTFIX this with the solution of "don't do that then". Please reopen if there is a better usecase.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Flags: needinfo?(jgilbert)
Resolution: --- → WONTFIX
Updated•8 years ago
|
Attachment #8732868 -
Flags: review?(jgilbert)
Reporter | ||
Comment 15•8 years ago
|
||
(In reply to Jeff Gilbert [:jgilbert] from comment #12) > (In reply to Tommy Kuo [:KuoE0] from comment #0) > > I think it should be wrapped by #define something in [1]. > > > > When we define "MOZ_GL_PROVIDER" to "GLContextProviderEGL" in [2]. It causes > > the redefinition error of "class GL_CONTEXT_PROVIDER_NAME" in > > GLContextProviderImpl.h. > > Why do you want to do this? It is preferable to not 'fix' anything here if > there's no good reason to want to do this. Hi jgibert, the problem only happens on partner's build. And I think they already have workaround on it. If it is not an issue for us, I think WONTFIX is okay.
Comment 16•8 years ago
|
||
(In reply to Tommy Kuo [:KuoE0] from comment #15) > (In reply to Jeff Gilbert [:jgilbert] from comment #12) > > (In reply to Tommy Kuo [:KuoE0] from comment #0) > > > I think it should be wrapped by #define something in [1]. > > > > > > When we define "MOZ_GL_PROVIDER" to "GLContextProviderEGL" in [2]. It causes > > > the redefinition error of "class GL_CONTEXT_PROVIDER_NAME" in > > > GLContextProviderImpl.h. > > > > Why do you want to do this? It is preferable to not 'fix' anything here if > > there's no good reason to want to do this. > > Hi jgibert, the problem only happens on partner's build. And I think they > already have workaround on it. If it is not an issue for us, I think WONTFIX > is okay. Great, thanks!
You need to log in
before you can comment on or make changes to this bug.
Description
•