WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
119515
refactor
[WebGL] Vertex attribute binding validation method
https://bugs.webkit.org/show_bug.cgi?id=119515
Summary
[WebGL] Vertex attribute binding validation method
Przemyslaw Szymanski
Reported
2013-08-06 02:43:43 PDT
validateVertexAttributes method can has a little code refactoring. We can move some calculations to a separate methods. This also can be usable in other parts of the code. So less code and easy to reuse now.
Attachments
Vertex attribute binding validation method
(2.90 KB, patch)
2013-08-06 02:50 PDT
,
Przemyslaw Szymanski
no flags
Details
Formatted Diff
Diff
Vertex attribute binding validation method
(2.89 KB, patch)
2013-08-12 02:21 PDT
,
Przemyslaw Szymanski
dino
: review-
Details
Formatted Diff
Diff
Vertex attribute binding validation method
(2.87 KB, patch)
2013-08-13 00:49 PDT
,
Przemyslaw Szymanski
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Przemyslaw Szymanski
Comment 1
2013-08-06 02:50:30 PDT
Created
attachment 208178
[details]
Vertex attribute binding validation method
Kalyan
Comment 2
2013-08-06 03:50:50 PDT
Comment on
attachment 208178
[details]
Vertex attribute binding validation method View in context:
https://bugs.webkit.org/attachment.cgi?id=208178&action=review
> Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.h:62 > + inline bool validateBinding() const { return !enabled || (enabled && isBound()); }
Second check should be enough here.
Przemyslaw Szymanski
Comment 3
2013-08-06 04:23:48 PDT
I can't agreed. Two reasons: 1) I tested only the second check and it was not work well 2) Vertex attribute can be disabled (and then check should be true, it is ok) or enabled but bound. It can't be enabled and not bound. So there must be two checks
Kalyan
Comment 4
2013-08-06 05:09:47 PDT
(In reply to
comment #3
)
> I can't agreed. Two reasons: > 1) I tested only the second check and it was not work well > 2) Vertex attribute can be disabled (and then check should be true, it is ok) or enabled but bound. It can't be enabled and not bound. > > So there must be two checks
sorry, I missed that you moved the enabled check too.
zalan
Comment 5
2013-08-09 07:55:09 PDT
Comment on
attachment 208178
[details]
Vertex attribute binding validation method View in context:
https://bugs.webkit.org/attachment.cgi?id=208178&action=review
>> Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.h:62 >> + inline bool validateBinding() const { return !enabled || (enabled && isBound()); } > > Second check should be enough here.
Do you need the second enabled? (if enabled is false, the second part of the condition does not get evaluated, while if enabled is true, then it doesnt bring much value to the second part of the condition)
Przemyslaw Szymanski
Comment 6
2013-08-12 02:21:55 PDT
Created
attachment 208519
[details]
Vertex attribute binding validation method update after review
Przemyslaw Szymanski
Comment 7
2013-08-12 02:24:08 PDT
(In reply to
comment #5
)
> (From update of
attachment 208178
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=208178&action=review
> > >> Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.h:62 > >> + inline bool validateBinding() const { return !enabled || (enabled && isBound()); } > > > > Second check should be enough here. > > Do you need the second enabled? (if enabled is false, the second part of the condition does not get evaluated, while if enabled is true, then it doesnt bring much value to the second part of the condition)
Good point. Thank you. I updated this code. Review again please.
Chris Dumez
Comment 8
2013-08-12 10:30:44 PDT
Comment on
attachment 208519
[details]
Vertex attribute binding validation method View in context:
https://bugs.webkit.org/attachment.cgi?id=208519&action=review
> Source/WebCore/ChangeLog:6 > + This patch refactors WebGLRenderingContext code by move a vertex
"by moving"
> Source/WebCore/ChangeLog:7 > + attribute binding validation to the separate method. It is now
"to a separate"
> Source/WebCore/ChangeLog:9 > + code is more readable and more clear now.
"more readable and more clear": pretty much means the same. Probably one is enough.
> Source/WebCore/ChangeLog:13 > + No new tests. Covered by existing tests.
There is no behavior change, right? If so, it is a good idea to say so in the Changelog.
> Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.h:61 > + inline bool isBound() const { return bufferBinding && bufferBinding->object(); }
inline is redundant here.
> Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.h:62 > + inline bool validateBinding() const { return !enabled || isBound(); }
Ditto.
Chris Dumez
Comment 9
2013-08-12 10:31:35 PDT
Comment on
attachment 208519
[details]
Vertex attribute binding validation method View in context:
https://bugs.webkit.org/attachment.cgi?id=208519&action=review
>> Source/WebCore/ChangeLog:6 >> + This patch refactors WebGLRenderingContext code by move a vertex > > "by moving"
"by moving the" actually
Dean Jackson
Comment 10
2013-08-12 12:59:49 PDT
Comment on
attachment 208519
[details]
Vertex attribute binding validation method Another +1 to Christophe's review. Just minor changes needed before r+
Przemyslaw Szymanski
Comment 11
2013-08-13 00:49:36 PDT
Created
attachment 208605
[details]
Vertex attribute binding validation method
Przemyslaw Szymanski
Comment 12
2013-08-13 00:51:59 PDT
Christophe, thank you very much for review. Changes applied.
Chris Dumez
Comment 13
2013-08-13 00:53:08 PDT
Comment on
attachment 208605
[details]
Vertex attribute binding validation method Looks like a nice refactoring. r=me but please let Dean take a final look before landing as he was reviewing this as well.
Przemyslaw Szymanski
Comment 14
2013-08-14 03:57:45 PDT
Dean Jackson, could you do a final review for this patch? Thank you.
Chris Dumez
Comment 15
2013-08-15 23:42:01 PDT
(In reply to
comment #14
)
> Dean Jackson, could you do a final review for this patch? Thank you.
Dean seems busy. Feel free to land the patch.
WebKit Commit Bot
Comment 16
2013-08-16 00:16:00 PDT
Comment on
attachment 208605
[details]
Vertex attribute binding validation method Clearing flags on attachment: 208605 Committed
r154166
: <
http://trac.webkit.org/changeset/154166
>
WebKit Commit Bot
Comment 17
2013-08-16 00:16:03 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