RESOLVED FIXED 52339
Remove sizeInBytes from GraphicsContext3D's various implementations
https://bugs.webkit.org/show_bug.cgi?id=52339
Summary Remove sizeInBytes from GraphicsContext3D's various implementations
Zhenyao Mo
Reported 2011-01-12 17:12:09 PST
Since we defined CG3D types to match GL types, we can just use that to implement sizeInBytes instead. Maybe we could just remove this function from GraphicsContext3D and just implement it on the WebGLRenderingContext side.
Attachments
Patch (6.85 KB, patch)
2011-01-24 14:30 PST, Zhenyao Mo
darin: review+
Zhenyao Mo
Comment 1 2011-01-24 14:30:22 PST
Zhenyao Mo
Comment 2 2011-01-24 14:31:38 PST
(In reply to comment #1) > Created an attachment (id=79978) [details] > Patch Note that we didn't remove sizeInBytes from WebGraphicsContext3D. We can do it in 51947.
Darin Adler
Comment 3 2011-01-24 14:32:39 PST
Comment on attachment 79978 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=79978&action=review > Source/WebCore/html/canvas/WebGLRenderingContext.cpp:506 > + default: > + return 0; Normally we leave defaults out of our switch statements to allow the compiler to check that we covered all the enum values. Then, outside the switch we put something like this: ASSERT_NOT_REACHED(); return 0; Because it’s not correct for someone to pass in a value that is not one of the enum constants.
Zhenyao Mo
Comment 4 2011-01-24 14:33:53 PST
(In reply to comment #3) > (From update of attachment 79978 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=79978&action=review > > > Source/WebCore/html/canvas/WebGLRenderingContext.cpp:506 > > + default: > > + return 0; > > Normally we leave defaults out of our switch statements to allow the compiler to check that we covered all the enum values. Then, outside the switch we put something like this: > > ASSERT_NOT_REACHED(); > return 0; > > Because it’s not correct for someone to pass in a value that is not one of the enum constants. I'll fix this in the landing patch. Thank you.
Zhenyao Mo
Comment 5 2011-01-24 14:42:38 PST
Note You need to log in before you can comment on or make changes to this bug.