Closed Bug 876929 Opened 11 years ago Closed 11 years ago

Actually check if we can support OES_standard_derivatives

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: jgilbert, Assigned: jgilbert)

Details

Attachments

(1 file)

We currently unconditionally support OES_standard_derivatives, even though we should be checking if the underlying implementation supports it. It looks like our tegra2 test slaves don't support it, among other hypothetical implementations.
Assignee: nobody → jgilbert
Attachment #755061 - Flags: review?(bjacob)
Comment on attachment 755061 [details] [diff] [review]
patch: Check for the extension on GLES2.

I found this more clear written as a single logical expression than with an if.
Attachment #755061 - Flags: review?(bjacob) → review+
I always find the opposite. Sure, splitting it is more verbose, but following the logic is always trickier with compound expressions. Sure, we do use the meme '!gles2 OR Supports(x)' in a number of places, but this always makes me look twice.

I always prefer trimming the possibility tree. In this case, we first handle non-GLES2, then we return whether or not we (now known to be GLES2) support the extension. In my opinion, this lends itself much better to later expansion and more complicated conditions, as well as naive intelligibility.
Backed out:
https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=2defb982c769

Looks like a warnings-as-errors failure.
Also I got the bug number wrong. :C
And then I posted in a different also-wrong bug.

Time for a break.
https://hg.mozilla.org/mozilla-central/rev/0278e6f6332d
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: