Closed Bug 743753 Opened 12 years ago Closed 12 years ago

Always generate WebGL warnings (remove webgl.verbose pref) and other related improvements

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: bjacob, Assigned: bjacob)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Whiteboard: webgl-next)

Attachments

(4 files)

The reason why WebGL warnings are disabled by default (have to flip webgl.verbose pref) is that the last time I checked (1 year ago), pages generating many WebGL warnings could be considerably slowed down by them. It seemed that the cost of generating a JS warning was very high.

Two factors could eventually allow us to reconsider that:
 - if JS warnings become cheaper to generate (profile it!)
 - if most WebGL pages no longer generate many warnings (the worst offenders were pages relying on arbitrary attrib locations instead of calling {bind,get}AttribLocation.
If you use the nsContentUtils warning APIs, combined with the WarnOnce stuff on nsIDocument, assuming that's desirable here, then you could vastly reduce the number of warnings generated....
WarnOnce definitely sounds like something I want here. Thanks!
Blocks: 599070
Depends on: 753734
Summary: Always generate WebGL warnings (remove webgl.verbose pref) → Always generate WebGL warnings (remove webgl.verbose pref) and other related improvements
The problem with ReportToConsole is that it wants a localized string. WebGL warnings aren't currently localized and while that might be a good idea, I don't want to block this on that.
Do not generate more than N (where N=32 currently) warnings per WebGL context. + informative extra warning when the Nth warning is generated.
Attachment #626153 - Flags: review?(vladimir)
Attachment #626153 - Attachment description: limit the number of warnings per WebGL context → 1: limit the number of warnings per WebGL context
With patch 1, this pref isn't useful enough anymore to justify its existence.
Attachment #626157 - Flags: review?(vladimir)
This name matches more closely what this does and the 'severity' of these messages.
Attachment #626158 - Flags: review?(vladimir)
Mostly a plain regex change. Some users reported they were puzzled by inconsistent case like TexImage2D vs texImage2D in WebGL warnings.
Attachment #626162 - Flags: review?(vladimir)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: