WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
89293
[TextureMapper] Reduce boilerplate code in the TextureMapperShaderManager
https://bugs.webkit.org/show_bug.cgi?id=89293
Summary
[TextureMapper] Reduce boilerplate code in the TextureMapperShaderManager
Martin Robinson
Reported
2012-06-16 17:24:28 PDT
The amount of boilerplate code in TextureMapperShaderManager could be reduced quite a bit to make the code more readable.
Attachments
Patch
(25.41 KB, patch)
2012-06-17 20:43 PDT
,
Martin Robinson
no flags
Details
Formatted Diff
Diff
Patch
(25.41 KB, patch)
2012-06-17 21:06 PDT
,
Martin Robinson
no flags
Details
Formatted Diff
Diff
Patch
(25.68 KB, patch)
2012-06-17 22:09 PDT
,
Martin Robinson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Martin Robinson
Comment 1
2012-06-17 20:43:25 PDT
Created
attachment 148043
[details]
Patch
Martin Robinson
Comment 2
2012-06-17 21:06:00 PDT
Created
attachment 148044
[details]
Patch
Noam Rosenthal
Comment 3
2012-06-17 21:36:51 PDT
Comment on
attachment 148044
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=148044&action=review
Awesome! Though let's use >= 0 or an enum { InvalidLocation = -1 } instead of using -1 as a magic number.
> Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp:397 > + if (program->opacityLocation() != -1)
How about >= 0
> Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp:434 > + if (program->opacityLocation() != -1)
>= 0
Martin Robinson
Comment 4
2012-06-17 22:09:40 PDT
Created
attachment 148052
[details]
Patch
Martin Robinson
Comment 5
2012-06-17 22:10:35 PDT
Makes sense! I've replaced the test for != -1 with a call to the new static method, TextureMapperShaderProgram::isValidUniformLocation.
WebKit Review Bot
Comment 6
2012-06-17 23:36:24 PDT
Comment on
attachment 148052
[details]
Patch Clearing flags on attachment: 148052 Committed
r120572
: <
http://trac.webkit.org/changeset/120572
>
WebKit Review Bot
Comment 7
2012-06-17 23:36:29 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug