Closed Bug 1188540 Opened 9 years ago Closed 9 years ago

Forward texture-related calls to WebGLTexture

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: jgilbert, Assigned: jgilbert)

References

Details

Attachments

(5 files)

Instead of polluting our massive WebGLContextGL.cpp file, we can forward these to a sensible place, much like the forwarding we have for shaders, programs, and other objects.
This is mostly moves. Only code changes are necessary translations.
Attachment #8640017 - Flags: review?(dglastonbury)
Same, but for WebGL2 funcs.
Attachment #8640018 - Flags: review?(dglastonbury)
Oh, I forgot I also normalized a bunch of variable names.
Attachment #8640014 - Flags: review?(dglastonbury) → review+
Comment on attachment 8640017 [details] [diff] [review]
0002-Forward-and-translate.patch

Review of attachment 8640017 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/canvas/WebGL2ContextTextures.cpp
@@ +396,4 @@
>          return ErrorInvalidOperation("texSubImage2D: not enough data for operation (need %d, have %d)", bytesNeeded, dataLength);
>  
>      if (imageInfo.HasUninitializedImageData()) {
> +        bool coversWholeImage = xOffset == 0 &&

Wrap with (). (Helps emacs auto-format)

::: dom/canvas/WebGLTexture.h
@@ +86,4 @@
>      ~WebGLTexture() {
>          DeleteOnce();
>      }
> +public:

blank line above
Attachment #8640017 - Flags: review?(dglastonbury) → review+
Attachment #8640018 - Flags: review?(dglastonbury) → review+
Attachment #8641836 - Flags: review?(dglastonbury)
Attachment #8641837 - Flags: review?(dglastonbury)
Blocks: 1189917
Comment on attachment 8641836 [details] [diff] [review]
0004-Build-with-warn-as-error-on-Linux.patch

Review of attachment 8641836 [details] [diff] [review]:
-----------------------------------------------------------------

Maybe we should take :smaug's advice and put the DOM facing WebGL stuff into the dom namespace at some point.  Would be happy to keep implementation details in webgl:: but anything that is called via .webidl bindings would be simpler in dom::. It would clean up dom/bindings/Bindings.conf too.
Attachment #8641836 - Flags: review?(dglastonbury) → review+
Attachment #8641837 - Flags: review?(dglastonbury) → review+
(In reply to Dan Glastonbury :djg :kamidphish from comment #10)
> Comment on attachment 8641836 [details] [diff] [review]
> 0004-Build-with-warn-as-error-on-Linux.patch
> 
> Review of attachment 8641836 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Maybe we should take :smaug's advice and put the DOM facing WebGL stuff into
> the dom namespace at some point.  Would be happy to keep implementation
> details in webgl:: but anything that is called via .webidl bindings would be
> simpler in dom::. It would clean up dom/bindings/Bindings.conf too.

Something to consider, though much of WebGL would end up as dom:: then.
https://hg.mozilla.org/mozilla-central/rev/c2b62aef6a44
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: