Closed
Bug 1219890
Opened 9 years ago
Closed 9 years ago
Support WebGL2 on top of ES3
Categories
(Core :: Graphics: CanvasWebGL, defect)
Core
Graphics: CanvasWebGL
Tracking
()
RESOLVED
FIXED
mozilla45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: jrmuizel, Assigned: jrmuizel)
References
Details
(Whiteboard: [gfx-noted])
Attachments
(3 files, 2 obsolete files)
3.11 KB,
patch
|
jgilbert
:
review+
|
Details | Diff | Splinter Review |
1.25 KB,
patch
|
jgilbert
:
review+
|
Details | Diff | Splinter Review |
11.97 KB,
patch
|
jgilbert
:
review+
|
Details | Diff | Splinter Review |
This is needed for ANGLE
Assignee | ||
Comment 1•9 years ago
|
||
Updated•9 years ago
|
Assignee: nobody → jmuizelaar
Whiteboard: [gfx-noted]
Assignee | ||
Comment 2•9 years ago
|
||
jgilbert, do you have any preferences for how to implement this? Should we duplicate the static arrays with es3 versions or should we build the arrays dynamically on the stack? How should we communicate the version required to the context?
Flags: needinfo?(jgilbert)
Comment 3•9 years ago
|
||
Let's construct arrays. Having static arrays is nice when the options are limited, but not really necessary when we'd have to have a large number.
Also it'd be nice to support printing out our chosen array, perhaps when MOZ_GL_SPEW=1?
Flags: needinfo?(jgilbert)
Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8680877 -
Attachment is obsolete: true
Attachment #8693074 -
Flags: review?(jgilbert)
Assignee | ||
Comment 5•9 years ago
|
||
Attachment #8693075 -
Flags: review?(jgilbert)
Assignee | ||
Comment 6•9 years ago
|
||
Attachment #8693082 -
Flags: review?(jgilbert)
Comment 7•9 years ago
|
||
Comment on attachment 8693074 [details] [diff] [review]
Construct context arguments on the stack
Review of attachment 8693074 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/gl/GLContextProviderEGL.cpp
@@ +498,5 @@
>
> EGLContext eglShareContext = shareContext ? shareContext->mContext
> : EGL_NO_CONTEXT;
> +
> + nsAutoTArray<EGLint, 6> contextAttribs;
It doesn't hurt to have the `, 6` here, but it's not something we should be worrying about in such cold code. I would omit this as premature optimization.
@@ +499,5 @@
> EGLContext eglShareContext = shareContext ? shareContext->mContext
> : EGL_NO_CONTEXT;
> +
> + nsAutoTArray<EGLint, 6> contextAttribs;
> + contextAttribs.AppendElement(LOCAL_EGL_CONTEXT_CLIENT_VERSION); contextAttribs.AppendElement(2);
Don't put two lines on one line. Surround with newlines to establish that these are a pair. Use a lambda if you want to make it very explicit.
Attachment #8693074 -
Flags: review?(jgilbert) → review+
Comment 8•9 years ago
|
||
Comment on attachment 8693075 [details] [diff] [review]
Make assignment operator and copy constructor default.
Review of attachment 8693075 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/gl/SurfaceTypes.cpp
@@ +15,5 @@
> Clear();
> }
>
> +/* These are defined out of line so that we don't need to include
> + * ISurfaceAllocator.h in the header */
Use `//` for short comments like this.
@@ +21,2 @@
> SurfaceCaps&
> +SurfaceCaps::operator=(const SurfaceCaps& other) = default;
Tools I wish I had when I wrote this!
Attachment #8693075 -
Flags: review?(jgilbert) → review+
Comment 9•9 years ago
|
||
Comment on attachment 8693082 [details] [diff] [review]
Use es3 when appropriate
Review of attachment 8693082 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/gl/GLContextProviderEGL.cpp
@@ +500,5 @@
> : EGL_NO_CONTEXT;
>
> nsAutoTArray<EGLint, 6> contextAttribs;
> + contextAttribs.AppendElement(LOCAL_EGL_CONTEXT_CLIENT_VERSION);
> + if (caps.es3)
Use CreateContextFlags for this.
::: gfx/gl/SurfaceTypes.h
@@ +25,5 @@
> bool depth, stencil;
> bool antialias;
> bool premultAlpha;
> bool preserve;
> + bool es3;
This is not how we should pass this down.
Attachment #8693082 -
Flags: review?(jgilbert) → review-
Assignee | ||
Comment 10•9 years ago
|
||
How about this one.
Attachment #8693082 -
Attachment is obsolete: true
Attachment #8694230 -
Flags: review?(jgilbert)
Updated•9 years ago
|
Attachment #8694230 -
Flags: review?(jgilbert) → review+
Comment 11•9 years ago
|
||
Comment 12•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/232826e2ee72
https://hg.mozilla.org/mozilla-central/rev/811dce914c46
https://hg.mozilla.org/mozilla-central/rev/5426f8048840
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in
before you can comment on or make changes to this bug.
Description
•