Closed
Bug 908841
Opened 11 years ago
Closed 11 years ago
WebGL2 Add more natively supported extensions
Categories
(Core :: Graphics: CanvasWebGL, defect)
Core
Graphics: CanvasWebGL
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: guillaume.abadie, Assigned: guillaume.abadie)
References
Details
Attachments
(5 files)
25.30 KB,
patch
|
jgilbert
:
review+
|
Details | Diff | Splinter Review |
9.93 KB,
patch
|
jgilbert
:
review+
|
Details | Diff | Splinter Review |
9.70 KB,
patch
|
jgilbert
:
review+
|
Details | Diff | Splinter Review |
1.06 KB,
patch
|
jgilbert
:
review+
|
Details | Diff | Splinter Review |
2.71 KB,
patch
|
jgilbert
:
review+
|
Details | Diff | Splinter Review |
Add native support of followed extension in WebGL 2:
- OES_element_index_uint
- OES_standard_derivatives
- OES_texture_float
- OES_texture_float_linear
- WEBGL_depth_texture
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #794907 -
Flags: review?(jgilbert)
Assignee | ||
Comment 2•11 years ago
|
||
The objective is to have:
static const char* WebGLContext::GetExtensionString(WebGLExtensionID ext)
for following patches.
Attachment #794909 -
Flags: review?(jgilbert)
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #794913 -
Flags: review?(jgilbert)
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #794914 -
Flags: review?(jgilbert)
Updated•11 years ago
|
Attachment #794907 -
Flags: review?(jgilbert) → review+
Comment 5•11 years ago
|
||
Comment on attachment 794909 [details] [diff] [review]
patch step 2 - revision 1: New string conversion for WebGL extensions
Review of attachment 794909 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/canvas/src/WebGLContextExtensions.cpp
@@ +158,4 @@
> {
> + if (CompareWebGLExtensionName(name, "MOZ_WEBGL_lose_context")) {
> + ext = WEBGL_lose_context;
> + }
Why do we still have these? Why aren't they caught by the for loop above?
Comment 6•11 years ago
|
||
Comment on attachment 794913 [details] [diff] [review]
patch step 3 revision 1: Change the WebGL 2 validation system.
Review of attachment 794913 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/canvas/src/WebGL2Context.cpp
@@ +71,5 @@
> + GLFeature::transform_feedback
> + };
> +
> + // check WebGL extensions that are supposed to be natively supported
> + for (size_t i = 0; i < size_t(MOZ_ARRAY_LENGTH(sExtensionNativelySupportedArr)); i++)
Does MOZ_ARRAY_LENGTH really not return a size_t?
Attachment #794913 -
Flags: review?(jgilbert) → review+
Updated•11 years ago
|
Attachment #794914 -
Flags: review?(jgilbert) → review+
Assignee | ||
Comment 7•11 years ago
|
||
(In reply to Jeff Gilbert [:jgilbert] from comment #5)
> Comment on attachment 794909 [details] [diff] [review]
> patch step 2 - revision 1: New string conversion for WebGL extensions
>
> Review of attachment 794909 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: content/canvas/src/WebGLContextExtensions.cpp
> @@ +158,4 @@
> > {
> > + if (CompareWebGLExtensionName(name, "MOZ_WEBGL_lose_context")) {
> > + ext = WEBGL_lose_context;
> > + }
>
> Why do we still have these? Why aren't they caught by the for loop above?
Because if it were, we would have to put those strings in the const array, and so having different indices for same extensions to keep the 1:1 matching with the enumeration. So I did like that instead, and because we are not going to add MOZ_ prefix anymore thanks by the draft extension flag like Chrome does, it is okay to just accept them here for compatibility.
Assignee | ||
Comment 8•11 years ago
|
||
(In reply to Jeff Gilbert [:jgilbert] from comment #6)
> Comment on attachment 794913 [details] [diff] [review]
> patch step 3 revision 1: Change the WebGL 2 validation system.
>
> Review of attachment 794913 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: content/canvas/src/WebGL2Context.cpp
> @@ +71,5 @@
> > + GLFeature::transform_feedback
> > + };
> > +
> > + // check WebGL extensions that are supposed to be natively supported
> > + for (size_t i = 0; i < size_t(MOZ_ARRAY_LENGTH(sExtensionNativelySupportedArr)); i++)
>
> Does MOZ_ARRAY_LENGTH really not return a size_t?
Oups... Good catch! Fixed.
Assignee | ||
Comment 9•11 years ago
|
||
I have forgotten to qrefresh, again... So this patch just add constants in the WebGL 2's WebIDL.
Attachment #795519 -
Flags: review?(jgilbert)
Comment 10•11 years ago
|
||
(In reply to Guillaume Abadie from comment #7)
> (In reply to Jeff Gilbert [:jgilbert] from comment #5)
> > Comment on attachment 794909 [details] [diff] [review]
> > patch step 2 - revision 1: New string conversion for WebGL extensions
> >
> > Review of attachment 794909 [details] [diff] [review]:
> > -----------------------------------------------------------------
> >
> > ::: content/canvas/src/WebGLContextExtensions.cpp
> > @@ +158,4 @@
> > > {
> > > + if (CompareWebGLExtensionName(name, "MOZ_WEBGL_lose_context")) {
> > > + ext = WEBGL_lose_context;
> > > + }
> >
> > Why do we still have these? Why aren't they caught by the for loop above?
> Because if it were, we would have to put those strings in the const array,
> and so having different indices for same extensions to keep the 1:1 matching
> with the enumeration. So I did like that instead, and because we are not
> going to add MOZ_ prefix anymore thanks by the draft extension flag like
> Chrome does, it is okay to just accept them here for compatibility.
Oh, ok. It'd be nice to leave a comment that says 'check for vendor-prefixed extensions for backwards compatibility', or something.
Comment 11•11 years ago
|
||
Comment on attachment 794909 [details] [diff] [review]
patch step 2 - revision 1: New string conversion for WebGL extensions
Review of attachment 794909 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/canvas/src/WebGLContextExtensions.cpp
@@ +158,4 @@
> {
> + if (CompareWebGLExtensionName(name, "MOZ_WEBGL_lose_context")) {
> + ext = WEBGL_lose_context;
> + }
Let's leave a comment that these are here so we can still support the deprecated vendor-prefixed aliases.
Attachment #794909 -
Flags: review?(jgilbert) → review+
Updated•11 years ago
|
Attachment #795519 -
Flags: review?(jgilbert) → review+
Assignee | ||
Comment 12•11 years ago
|
||
(In reply to Jeff Gilbert [:jgilbert] from comment #11)
> Comment on attachment 794909 [details] [diff] [review]
> patch step 2 - revision 1: New string conversion for WebGL extensions
>
> Review of attachment 794909 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: content/canvas/src/WebGLContextExtensions.cpp
> @@ +158,4 @@
> > {
> > + if (CompareWebGLExtensionName(name, "MOZ_WEBGL_lose_context")) {
> > + ext = WEBGL_lose_context;
> > + }
>
> Let's leave a comment that these are here so we can still support the
> deprecated vendor-prefixed aliases.
Fixed! Thanks!
Assignee | ||
Comment 13•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/2ce3466b3c49
https://hg.mozilla.org/integration/mozilla-inbound/rev/4ad33575aad4
https://hg.mozilla.org/integration/mozilla-inbound/rev/57b672779178
https://hg.mozilla.org/integration/mozilla-inbound/rev/6156c0dc50bf
Target Milestone: --- → mozilla26
Comment 14•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/2ce3466b3c49
https://hg.mozilla.org/mozilla-central/rev/4ad33575aad4
https://hg.mozilla.org/mozilla-central/rev/57b672779178
https://hg.mozilla.org/mozilla-central/rev/6156c0dc50bf
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Keywords: dev-doc-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•