Closed Bug 520920 Opened 15 years ago Closed 15 years ago

Update WebGL arrays to support views

Categories

(Core :: Graphics: Canvas2D, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mwsteele, Assigned: vlad)

References

Details

Attachments

(4 files, 6 obsolete files)

      No description provided.
still missing:
- offset/length ctor&set calls
- array copy ctors
- slice
Comment on attachment 404973 [details] [diff] [review]
add CanvasArrayBuffer; make Canvas*Arrays views

>+            if (NS_FAILED(rv) || !canvasObj) {
>+            //    nsCOMPtr<nsICanvasArrayBuffer> arrayBuf = do_QueryInterface(canvasObj, &rv); 
>+                fprintf(stderr, "new CanvasFloatArray from CanvasFloatArray\n");
>+                return NS_ERROR_DOM_SYNTAX_ERR;

Remove debugging code? (same idiom in each array type)


>diff -r 385f917b3cf9 layout/build/nsLayoutModule.cpp
>--- a/layout/build/nsLayoutModule.cpp	Sun Sep 20 00:12:48 2009 +1200
>+++ b/layout/build/nsLayoutModule.cpp	Tue Oct 06 20:15:13 2009 -0400
>@@ -1071,6 +1071,11 @@
>     NS_CANVASRENDERINGCONTEXTWEBGL_CID,
>     "@mozilla.org/content/canvas-rendering-context;1?id=moz-webgl",
>     CreateCanvasRenderingContextWebGL },
>+  { "Canvas WebGL Rendering Context",
>+    NS_CANVASRENDERINGCONTEXTWEBGL_CID,
>+    "@mozilla.org/content/canvas-rendering-context;1?id=experimental-webgl",
>+    CreateCanvasRenderingContextWebGL },

Should we enable experimental-webgl now? Are there any things that we don't support or that we support under different names?
Attachment #404973 - Flags: review+
Attached patch offsets & slice; some fixes (obsolete) — Splinter Review
Attachment #404973 - Attachment is obsolete: true
Attached file standalone array tests (obsolete) —
Attached patch add array get/set (obsolete) — Splinter Review
Attachment #405215 - Attachment is obsolete: true
Attachment #406370 - Flags: review?(vladimir)
Attachment #405216 - Attachment is obsolete: true
Attachment #406370 - Attachment is obsolete: true
Attachment #407179 - Flags: review?(vladimir)
Attachment #406370 - Flags: review?(vladimir)
Attachment #407179 - Attachment is obsolete: true
Attachment #407719 - Flags: review?(vladimir)
Attachment #407179 - Flags: review?(vladimir)
Comment on attachment 407719 [details] [diff] [review]
add interface to get WebGLArrayBuffer instance

Looks fine, but get rid of the invalid WrapJS calls in the blocks that return NOT_IMPLEMENTED; just have the NS_FAILED/!canvasObj block return a syntax error.
Attachment #407719 - Flags: review?(vladimir) → review+
Patch on top of the previous patch, that fixes some bugs and moves some stuff around.
Attachment #408461 - Flags: review?(mwsteele)
Forgot to add new files.
Attachment #408461 - Attachment is obsolete: true
Attachment #408469 - Flags: review?(mwsteele)
Attachment #408461 - Flags: review?(mwsteele)
Attachment #408469 - Flags: review?(mwsteele) → review+
http://hg.mozilla.org/mozilla-central/rev/a2dc7d54c77c
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Assignee: nobody → vladimir
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: