Closed
Bug 1262265
Opened 9 years ago
Closed 9 years ago
Cleanup GLContext symbol initialization
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: jgilbert, Assigned: jgilbert)
Details
Attachments
(7 files)
(deleted),
text/x-review-board-request
|
jrmuizel
:
review+
|
Details |
(deleted),
text/x-review-board-request
|
jrmuizel
:
review+
|
Details |
(deleted),
text/x-review-board-request
|
jrmuizel
:
review+
|
Details |
(deleted),
text/x-review-board-request
|
jrmuizel
:
review+
|
Details |
(deleted),
text/x-review-board-request
|
jrmuizel
:
review+
|
Details |
(deleted),
text/x-review-board-request
|
jrmuizel
:
review+
|
Details |
(deleted),
text/x-review-board-request
|
jrmuizel
:
review+
|
Details |
It's pretty messy, and could use a bit of a cleanup.
Particularly, it'd be nice to improve readability of code flow regarding which parts can cause context creation to fail.
Assignee | ||
Comment 1•9 years ago
|
||
From 9d86dbd546df9349a0a9f1c089b491a7524e9450 Mon Sep 17 00:00:00 2001
---
dom/canvas/WebGLContext.cpp | 2 +-
gfx/gl/GLContext.cpp | 1934 ++++++++++++++++++---------------------
gfx/gl/GLContext.h | 29 +-
gfx/gl/GLContextCGL.h | 2 +-
gfx/gl/GLContextEAGL.h | 2 +-
gfx/gl/GLContextProviderCGL.mm | 6 -
gfx/gl/GLContextProviderEAGL.mm | 6 -
gfx/gl/GLLibraryLoader.cpp | 6 +-
gfx/gl/GLLibraryLoader.h | 4 +-
9 files changed, 897 insertions(+), 1094 deletions(-)
Review commit: https://reviewboard.mozilla.org/r/44399/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/44399/
Attachment #8738264 -
Flags: review?(jmuizelaar)
Comment 2•9 years ago
|
||
Comment on attachment 8738264 [details]
MozReview Request: Bug 1262265 - Cleanup InitWithPrefix. - r?jrmuizel
https://reviewboard.mozilla.org/r/44399/#review42077
It's probably worth adding gfxCriticalNote/gfxCriticalWarning's in the places that are not expected to fail but we still attempt to handle failure case.
Attachment #8738264 -
Flags: review?(jmuizelaar)
Comment 3•9 years ago
|
||
(In reply to Jeff Muizelaar [:jrmuizel] from comment #2)
> Comment on attachment 8738264 [details]
> MozReview Request: Bug 1262265 - Cleanup InitWithPrefix. - r?jrmuizel
>
> https://reviewboard.mozilla.org/r/44399/#review42077
>
> It's probably worth adding gfxCriticalNote/gfxCriticalWarning's in the
> places that are not expected to fail but we still attempt to handle failure
> case.
e.g. when we get the renderer string etc.
Comment 4•9 years ago
|
||
Comment on attachment 8738264 [details]
MozReview Request: Bug 1262265 - Cleanup InitWithPrefix. - r?jrmuizel
https://reviewboard.mozilla.org/r/44399/#review42117
Attachment #8738264 -
Flags: review+
Backed out for mass android bustage like https://treeherder.mozilla.org/logviewer.html#?job_id=25561389&repo=mozilla-inbound
https://hg.mozilla.org/integration/mozilla-inbound/rev/cc130a8f204d
Not just android, as it turns out: https://treeherder.mozilla.org/logviewer.html#?job_id=25562779&repo=mozilla-inbound
Flags: needinfo?(jgilbert)
Assignee | ||
Comment 8•9 years ago
|
||
From 30a8c48ef9afeb8cac5124244a1f4091d0a2238d Mon Sep 17 00:00:00 2001
---
gfx/gl/GLContextProviderCGL.mm | 19 +++++++------------
gfx/gl/GLContextProviderEAGL.mm | 13 ++++++++-----
gfx/gl/GLContextProviderGLX.cpp | 15 ++++-----------
gfx/gl/GLContextProviderWGL.cpp | 20 +++-----------------
4 files changed, 22 insertions(+), 45 deletions(-)
Review commit: https://reviewboard.mozilla.org/r/45915/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/45915/
Attachment #8740690 -
Flags: review?(jmuizelaar)
Attachment #8740691 -
Flags: review?(jmuizelaar)
Attachment #8740692 -
Flags: review?(jmuizelaar)
Attachment #8740693 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 9•9 years ago
|
||
From 6aa28e18fb9ff96e22945d130933ba6062161372 Mon Sep 17 00:00:00 2001
---
gfx/gl/GLContextProviderEGL.cpp | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
Review commit: https://reviewboard.mozilla.org/r/45917/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/45917/
Assignee | ||
Comment 10•9 years ago
|
||
From 6ea76a49d344a5e122709b4cffa75a5a618e7fe1 Mon Sep 17 00:00:00 2001
---
gfx/gl/GLContextProviderEGL.cpp | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
Review commit: https://reviewboard.mozilla.org/r/45919/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/45919/
Assignee | ||
Comment 11•9 years ago
|
||
From 649a327d8a82cb3b7339223174a787b6957ae2b8 Mon Sep 17 00:00:00 2001
---
gfx/gl/GLContextProviderCGL.mm | 3 ++-
gfx/gl/GLContextProviderEAGL.mm | 3 ++-
gfx/gl/GLContextProviderGLX.cpp | 3 ++-
gfx/gl/GLContextProviderWGL.cpp | 5 +++--
4 files changed, 9 insertions(+), 5 deletions(-)
Review commit: https://reviewboard.mozilla.org/r/45921/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/45921/
Assignee | ||
Comment 12•9 years ago
|
||
From 7c9bbc1952be0da6c6d7b2d745edb4a05a26715a Mon Sep 17 00:00:00 2001
---
gfx/gl/GLContext.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Review commit: https://reviewboard.mozilla.org/r/45923/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/45923/
Assignee | ||
Comment 13•9 years ago
|
||
Comment on attachment 8738264 [details]
MozReview Request: Bug 1262265 - Cleanup InitWithPrefix. - r?jrmuizel
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/44399/diff/1-2/
Comment 14•9 years ago
|
||
Can't we just get rid of GetGlobalContext from the public GLContextProvider API?
There aren't any callers of it.
GLContextProviderCGL doesn't even implement it usefully, context sharing is never enabled for CGL [1] .
I doubt the other backends really need context sharing either.
[1] http://mxr.mozilla.org/mozilla-central/source/gfx/gl/GLContextProviderCGL.mm#235
Assignee | ||
Comment 15•9 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #14)
> Can't we just get rid of GetGlobalContext from the public GLContextProvider
> API?
>
> There aren't any callers of it.
>
> GLContextProviderCGL doesn't even implement it usefully, context sharing is
> never enabled for CGL [1] .
>
> I doubt the other backends really need context sharing either.
>
>
>
> [1]
> http://mxr.mozilla.org/mozilla-central/source/gfx/gl/GLContextProviderCGL.
> mm#235
F+, but I think EAGL uses it actually.
Snorp: Does iOS rely on context sharing via GetGlobalContext?
Flags: needinfo?(jgilbert) → needinfo?(snorp)
Updated•9 years ago
|
Attachment #8740690 -
Flags: review?(jmuizelaar) → review+
Comment 16•9 years ago
|
||
Comment on attachment 8740690 [details]
MozReview Request: Simplify and standardize GetGlobalContext. r?jrmuizel
https://reviewboard.mozilla.org/r/45915/#review43449
Comment 17•9 years ago
|
||
Comment 18•9 years ago
|
||
I backed out d3aab3c4eb5f (comment 17). Backout cset is:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1a1420dcc987
Backout was for GL-related fatal assertion failures like:
Assertion failure: internalFormat == 0x1908, at c:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/src/gfx/gl/GLContext.cpp:2925
Sample log: https://treeherder.mozilla.org/logviewer.html#?job_id=26164012&repo=mozilla-inbound
And there are more of these on the inbound treeherder run where this patch had landed:
https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=d3aab3c4eb5fae8b7768438577c95b0dc364e215
Flags: needinfo?(jgilbert)
Assignee | ||
Comment 19•9 years ago
|
||
From 34a6b4b4db28ebec0d0ceb021a418117a8c89444 Mon Sep 17 00:00:00 2001
---
gfx/gl/GLContextProviderEGL.cpp | 4 ++++
gfx/gl/GLLibraryEGL.h | 3 +++
2 files changed, 7 insertions(+)
Review commit: https://reviewboard.mozilla.org/r/47943/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/47943/
Assignee | ||
Comment 20•9 years ago
|
||
Comment on attachment 8738264 [details]
MozReview Request: Bug 1262265 - Cleanup InitWithPrefix. - r?jrmuizel
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/44399/diff/2-3/
Assignee | ||
Comment 21•9 years ago
|
||
Comment on attachment 8740690 [details]
MozReview Request: Simplify and standardize GetGlobalContext. r?jrmuizel
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/45915/diff/1-2/
Assignee | ||
Comment 22•9 years ago
|
||
Comment on attachment 8740691 [details]
MozReview Request: Centralize EnsureInitialized. r?jrmuizel
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/45917/diff/1-2/
Assignee | ||
Comment 23•9 years ago
|
||
Comment on attachment 8740692 [details]
MozReview Request: Don't call Init() twice. r?jrmuizel
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/45919/diff/1-2/
Assignee | ||
Comment 24•9 years ago
|
||
Comment on attachment 8740693 [details]
MozReview Request: Compiler says 'no'. r?jrmuizel
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/45921/diff/1-2/
Assignee | ||
Comment 25•9 years ago
|
||
Comment on attachment 8740694 [details]
MozReview Request: Fix the conditional.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/45923/diff/1-2/
Comment 26•9 years ago
|
||
Comment on attachment 8740691 [details]
MozReview Request: Centralize EnsureInitialized. r?jrmuizel
https://reviewboard.mozilla.org/r/45917/#review44899
Attachment #8740691 -
Flags: review?(jmuizelaar) → review+
Updated•9 years ago
|
Attachment #8740692 -
Flags: review?(jmuizelaar) → review+
Comment 27•9 years ago
|
||
Comment on attachment 8740692 [details]
MozReview Request: Don't call Init() twice. r?jrmuizel
https://reviewboard.mozilla.org/r/45919/#review44901
Comment 28•9 years ago
|
||
Comment on attachment 8740693 [details]
MozReview Request: Compiler says 'no'. r?jrmuizel
https://reviewboard.mozilla.org/r/45921/#review44903
Attachment #8740693 -
Flags: review?(jmuizelaar) → review+
Comment 29•9 years ago
|
||
Comment on attachment 8740694 [details]
MozReview Request: Fix the conditional.
https://reviewboard.mozilla.org/r/45923/#review44905
Attachment #8740694 -
Flags: review+
Assignee | ||
Updated•9 years ago
|
Attachment #8743624 -
Flags: review?(jmuizelaar)
Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(jgilbert)
Comment 30•9 years ago
|
||
Comment on attachment 8743624 [details]
MozReview Request: r?jrmuizel - Require initialization for egl.IsANGLE().
https://reviewboard.mozilla.org/r/47943/#review45033
Attachment #8743624 -
Flags: review?(jmuizelaar) → review+
Comment 31•9 years ago
|
||
Comment 32•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
(In reply to Jeff Gilbert [:jgilbert] from comment #15)
> (In reply to Matt Woodrow (:mattwoodrow) from comment #14)
> > Can't we just get rid of GetGlobalContext from the public GLContextProvider
> > API?
> >
> > There aren't any callers of it.
> >
> > GLContextProviderCGL doesn't even implement it usefully, context sharing is
> > never enabled for CGL [1] .
> >
> > I doubt the other backends really need context sharing either.
> >
> >
> >
> > [1]
> > http://mxr.mozilla.org/mozilla-central/source/gfx/gl/GLContextProviderCGL.
> > mm#235
>
> F+, but I think EAGL uses it actually.
>
> Snorp: Does iOS rely on context sharing via GetGlobalContext?
Sorry for the late reply, but yes, it does use that.
Flags: needinfo?(snorp)
You need to log in
before you can comment on or make changes to this bug.
Description
•