Bug 74083 - Define DEBUG_GL_COMMANDS only in debug builds.
Summary: Define DEBUG_GL_COMMANDS only in debug builds.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nayan Kumar K
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-08 06:19 PST by Nayan Kumar K
Modified: 2011-12-08 11:40 PST (History)
3 users (show)

See Also:


Attachments
Patch (16.72 KB, patch)
2011-12-08 06:27 PST, Nayan Kumar K
no flags Details | Formatted Diff | Diff
Define DEBUG_GL_COMMANDS in only in release builds (1.38 KB, patch)
2011-12-08 07:50 PST, Nayan Kumar K
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nayan Kumar K 2011-12-08 06:19:41 PST
This bug will fix following issues with Source/WebCore/platform/graphics/opengl/TextureMapperGL.cpp
a). Define DEBUG_GL_COMMANDS only for debug builds. Not sure if this change is absolutely necessary.
b). Fixes a syntax error when DEBUG_GL_COMMANDS is NOT defined. Basically, this change was intended just to fix a missing semi-colon in the following block,

 #ifdef DEBUG_GL_COMMANDS
 #define GL_CMD(x) {x, debugGLCommand(#x, __LINE__); }
 #else
 #define GL_CMD(x) x
 #endif

To

 #ifdef DEBUG_GL_COMMANDS
 #define GL_CMD(x) {x, debugGLCommand(#x, __LINE__); }
 #else
 #define GL_CMD(x) x; // Note the ; here
 #endif

But, I feel convention "GL_CMD(cmd);" is better than "GL_CMD(cmd)". Hence changed the usage of macro a bit.
Comment 1 Nayan Kumar K 2011-12-08 06:27:52 PST
Created attachment 118380 [details]
Patch
Comment 2 Early Warning System Bot 2011-12-08 06:39:22 PST
Comment on attachment 118380 [details]
Patch

Attachment 118380 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/10781295
Comment 3 Noam Rosenthal 2011-12-08 06:49:45 PST
Comment on attachment 118380 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=118380&action=review

> Source/WebCore/platform/graphics/opengl/TextureMapperGL.cpp:104
> -#define GL_CMD(x) {x, debugGLCommand(#x, __LINE__); }
> +#define GL_CMD(x) {x, debugGLCommand(#x, __LINE__) }

How would this work?
Please test this fix on debug builds as well :)
Comment 4 Nayan Kumar K 2011-12-08 07:50:13 PST
Created attachment 118389 [details]
Define DEBUG_GL_COMMANDS in only in release builds

Sorry for my ignorance with the earlier patch. This patch just defines DEBUG_GL_COMMANDS only in release mode and adds the missing semi-colon
Comment 5 WebKit Review Bot 2011-12-08 11:40:14 PST
Comment on attachment 118389 [details]
Define DEBUG_GL_COMMANDS in only in release builds

Clearing flags on attachment: 118389

Committed r102359: <http://trac.webkit.org/changeset/102359>
Comment 6 WebKit Review Bot 2011-12-08 11:40:18 PST
All reviewed patches have been landed.  Closing bug.