Closed
Bug 816168
Opened 13 years ago
Closed 13 years ago
Split out WebGLRenderbuffer into separate files
Categories
(Core :: Graphics: CanvasWebGL, defect)
Core
Graphics: CanvasWebGL
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: bjacob, Assigned: sawrubh)
References
Details
(Whiteboard: [mentor=bjacob][lang=c++] webgl-next)
Attachments
(1 file, 1 obsolete file)
12.61 KB,
patch
|
bjacob
:
review+
bjacob
:
checkin+
|
Details | Diff | Splinter Review |
This is a class living almost entirely inside WebGLContext.h.
Split it into a new separate header, WebGLRenderbuffer.h, and try to move most (or all) of its actual code in WebGLRenderbuffer.cpp.
Typically WebGLRenderbuffer.h would only include WebGLObjectModel.h and not WebGLContext.h. The point is to make it so that we can #include WebGLRenderbuffer.h without dragging in too many dependencies, and to bring WebGLContext.h down to a reasonable size.
See bug 801499 for the work on splitting WebGLBuffer out (which had to do lots of extra work as WebGLObjectModel.h didn't exist yet).
When moving its code into WebGLRenderbuffer.cpp, use discretion to decide where to stop. If a method is very small, does not require dragging in any dependency, is performance-critical so that the cost of the function call matters, and is used outside of WebGLRenderbuffer.cpp, then it can make sense for it to stay in WebGLRenderbuffer.h so that the compiler can still inline it without relying on link-time optimization.
If you get something that builds and passes 1.0.1 conformance tests,
https://www.khronos.org/registry/webgl/conformance-suites/1.0.1/webgl-conformance-tests.html
you'll know that you're on the right track.
Assignee | ||
Comment 1•13 years ago
|
||
Assignee: nobody → saurabhanandiit
Status: NEW → ASSIGNED
Attachment #687783 -
Flags: review?(bjacob)
Reporter | ||
Comment 2•13 years ago
|
||
Comment on attachment 687783 [details] [diff] [review]
Patch v1
Review of attachment 687783 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good!
::: content/canvas/src/WebGLObjectModel.cpp
@@ +32,5 @@
> + } else {
> + mWidth = 0;
> + mHeight = 0;
> + }
> +}
I think I'd rather keep these two methods in the header. They are very small, don't require any dependency, and there could conceivably be cases where the performance impact might matter.
Attachment #687783 -
Flags: review?(bjacob) → review+
Assignee | ||
Comment 3•13 years ago
|
||
Fixed nit.
Attachment #687783 -
Attachment is obsolete: true
Attachment #687851 -
Flags: checkin?(bjacob)
Reporter | ||
Comment 4•13 years ago
|
||
Target Milestone: --- → mozilla20
Reporter | ||
Comment 5•13 years ago
|
||
Comment on attachment 687851 [details] [diff] [review]
Patch v2
By the way, don't clear the review+ flag (or don't obsolete the patch with a review+ flag). Thanks.
Attachment #687851 -
Flags: review+
Attachment #687851 -
Flags: checkin?(bjacob)
Attachment #687851 -
Flags: checkin+
Comment 6•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•