Closed
Bug 593720
Opened 14 years ago
Closed 14 years ago
make WebGL quieter, less angry
Categories
(Core :: Graphics: CanvasWebGL, defect)
Core
Graphics: CanvasWebGL
Tracking
()
RESOLVED
FIXED
People
(Reporter: vlad, Assigned: vlad)
Details
Attachments
(3 files)
2.41 KB,
patch
|
bjacob
:
review+
|
Details | Diff | Splinter Review |
5.63 KB,
patch
|
vlad
:
review-
|
Details | Diff | Splinter Review |
3.12 KB,
patch
|
Details | Diff | Splinter Review |
Shh.
Attachment #472301 -
Flags: review?(bjacob)
Comment 1•14 years ago
|
||
Comment on attachment 472301 [details] [diff] [review] Quiet. It's a start, so why not. But 2 things to keep in mind: 1. When verbose is disabled, if there are messages that would have been printed in verbose mode, it would be good to at least display one message saying "There are WebGL error or warning messages in this page, but they have been hidden. To unhide WebGL messages, go to about:config and set webgl.verbose to true." 2. there also are potentially very verbose messages not going through this. I'm thinking about the LogMessage I put in WebGLTexture::NeedFakeBlack, and in the future the messages we could put when vertex attrib 0 is disabled, etc. So perhaps this is best handled once and for all in WebGLContext::LogMessage.
Attachment #472301 -
Flags: review?(bjacob) → review+
Comment 2•14 years ago
|
||
This follow-up patch needs to be applied on top of yours. - prints one message saying there are messages and explaining how to see them. - put that in LogMessage() itself so everything goes through it - prefix messsages by "WebGL: "
Attachment #472419 -
Flags: review?(bjacob)
Comment 3•14 years ago
|
||
Comment on attachment 472419 [details] [diff] [review] Follow-up errm... just asked myself for review :-P
Attachment #472419 -
Flags: review?(bjacob) → review?(vladimir)
Assignee | ||
Comment 4•14 years ago
|
||
Comment on attachment 472419 [details] [diff] [review] Follow-up No need; let's not complicate the code. I don't care about these error messages, either you get all of them or you get none -- a developer will know about the flag, a user won't care.
Attachment #472419 -
Flags: review?(vladimir) → review-
Comment 5•14 years ago
|
||
ok so I understand you mean "no need" for the change printing the message saying that there are messages. do you agree with the other changes? (Putting it in LogMessage and adding the WebGL prefix)
Comment 6•14 years ago
|
||
Hope this one is OK. Keeping mVerbose as a plain bool and not printing anything when verbose=false. Another change is that when console==null we still print to stderr.
Attachment #473115 -
Flags: review?(vladimir)
Assignee | ||
Comment 7•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/3a70f1b0e894
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 8•14 years ago
|
||
I ended up changing a few things in the commit -- take a look and see if the followup is still needed?
Comment 9•14 years ago
|
||
First I have a couple of questions about this changeset: - Since you're adding LogMessageIfVerbose(), why also add LogMessage(bool display, ...) ? Do you have a use case where you would pass to it something else than mVerbose ? - Why not at least let these two functions share the same code? (Implement LogMessageIfVerbose as calling LogMessage(mVerbose,...) ? - If you don't want LogMessage itself to check for mVerbose, why not just let the user do: if (mVerbose) LogMessage(...); I think that's just as good as LogMessage(mVerbose, ...); Also, my followup patch was prepending all WebGL messages with "WebGL: ". How about doing this?
Assignee | ||
Comment 10•14 years ago
|
||
Problem is that LogMessage is static, and mVerbose is a member variable. There are places where we use LogMessage in a static context -- such as from any of the other WebGL objects that don't have a direct pointer back to the WebGLContext object. LogIfVerbose is a non-static helper, whereas LogMessage(bool, ...) is static.
Comment 11•14 years ago
|
||
I see, thanks. Still one thing: the "WebGL: " prefix?
Updated•13 years ago
|
Attachment #473115 -
Flags: review?(vladimir)
You need to log in
before you can comment on or make changes to this bug.
Description
•