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.
Created attachment 79978 [details] Patch
(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.
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.
(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.
Committed r76549: <http://trac.webkit.org/changeset/76549>