Summary: | Remove sizeInBytes from GraphicsContext3D's various implementations | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Zhenyao Mo <zmo> | ||||
Component: | WebGL | Assignee: | Zhenyao Mo <zmo> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | cmarrin, enne, kbr | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | PC | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
Zhenyao Mo
2011-01-12 17:12:09 PST
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> |