Closed Bug 762265 Opened 8 years ago Closed 8 years ago

Modernize EGL extension detection, similar to GLContext's IsExtensionSupported

Categories

(Core :: Canvas: WebGL, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla16
Tracking Status
firefox15 --- fixed
firefox16 --- fixed

People

(Reporter: jgilbert, Assigned: jgilbert)

References

Details

Attachments

(1 file, 2 obsolete files)

We're going to be in EGL land on an increasing number of platforms, and working more with extensions for EGL for EGLImage, EGLSync, and hopefully eventually EGLStream.
Attached patch patch (obsolete) — Splinter Review
Attachment #630734 - Flags: review?(bjacob)
OS: Windows 7 → All
Hardware: x86_64 → All
Attached patch patch (obsolete) — Splinter Review
Adds NS_ERRORs when the extensions are 'supported', but their functions are not exposed.
Attachment #630734 - Attachment is obsolete: true
Attachment #630734 - Flags: review?(bjacob)
Attachment #630739 - Flags: review?(bjacob)
Blocks: 762263
Depends on: 762259
Comment on attachment 630739 [details] [diff] [review]
patch

Review of attachment 630739 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/gl/GLContext.cpp
@@ +539,5 @@
>  #else
>      const bool once = true;
>  #endif
>  
> +    mAvailableExtensions.Load(extensions, sExtensionNames, !once);

To remove the negation here and generally be more explicit, maybe you could use a |firstTime| variable here.

::: gfx/gl/GLContext.h
@@ +1568,2 @@
>          bool& operator[](size_t index) {
> +            NS_ASSERTION(index < Size, "out of range");

This should be a MOZ_ASSERT similar to bug 732607.
Attachment #630739 - Flags: review?(bjacob) → review+
Carrying forward r+ with nit fixes.
Attachment #630739 - Attachment is obsolete: true
Attachment #632051 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/27d0a3ecfe95
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Blocks: 758844
Blocks: 728524
Comment on attachment 632051 [details] [diff] [review]
patch with nits fixed

[Approval Request Comment]
Required by bug 728524
Attachment #632051 - Flags: approval-mozilla-beta?
Comment on attachment 632051 [details] [diff] [review]
patch with nits fixed

Approving supporting patches for bug 687267
Attachment #632051 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.