Bug 41108 - A buffer should be bound to one target in its lifetime
Summary: A buffer should be bound to one target in its lifetime
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Zhenyao Mo
URL:
Keywords:
Depends on:
Blocks: 41092
  Show dependency treegraph
 
Reported: 2010-06-23 15:21 PDT by Zhenyao Mo
Modified: 2010-06-28 10:43 PDT (History)
5 users (show)

See Also:


Attachments
patch (16.55 KB, patch)
2010-06-23 15:25 PDT, Zhenyao Mo
no flags Details | Formatted Diff | Diff
revised patch : responding to kbr's review (17.21 KB, patch)
2010-06-23 17:37 PDT, Zhenyao Mo
no flags Details | Formatted Diff | Diff
revised patch: fixed the typo (17.21 KB, patch)
2010-06-24 09:40 PDT, Zhenyao Mo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zhenyao Mo 2010-06-23 15:21:05 PDT
In WebGL, an attempt to bind a buffer to another target will generate INVALID_OPERATION.
Comment 1 Zhenyao Mo 2010-06-23 15:25:48 PDT
Created attachment 59568 [details]
patch
Comment 2 Kenneth Russell 2010-06-23 17:22:52 PDT
Comment on attachment 59568 [details]
patch

Generally looks good. One comment which will require another revision.


WebCore/html/canvas/WebGLBuffer.h:71
 +          unsigned m_arrayBufferByteLength;
These two byte lengths can be collapsed into one now. This should simplify the logic above.
Comment 3 Zhenyao Mo 2010-06-23 17:37:03 PDT
Created attachment 59587 [details]
revised patch : responding to kbr's review
Comment 4 Kenneth Russell 2010-06-23 17:49:26 PDT
Comment on attachment 59587 [details]
revised patch : responding to kbr's review

This looks good; nice cleanup. However I just noticed there's a typo in one comment which makes it really confusing.


WebCore/html/canvas/WebGLBuffer.cpp:149
 +      // In WebGL, a buffer is bound to its target in its lifetime
should read "one target in its lifetime"
Comment 5 Zhenyao Mo 2010-06-24 09:40:08 PDT
Created attachment 59664 [details]
revised patch: fixed the typo
Comment 6 Dimitri Glazkov (Google) 2010-06-24 09:54:12 PDT
Comment on attachment 59664 [details]
revised patch: fixed the typo

ok.
Comment 7 WebKit Commit Bot 2010-06-25 19:47:55 PDT
Comment on attachment 59664 [details]
revised patch: fixed the typo

Clearing flags on attachment: 59664

Committed r61934: <http://trac.webkit.org/changeset/61934>
Comment 8 WebKit Commit Bot 2010-06-25 19:48:00 PDT
All reviewed patches have been landed.  Closing bug.