Changeset 70661 in webkit
- Timestamp:
- Oct 27, 2010 10:10:14 AM (13 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r70657 r70661 1 2010-10-27 Zhenyao Mo <zmo@google.com> 2 3 Reviewed by Kenneth Russell. 4 5 If WebGL is running on top of a strict version of OpenGL ES it should make sure attribs have buffers assigned at all times 6 https://bugs.webkit.org/show_bug.cgi?id=47964 7 8 * html/canvas/WebGLRenderingContext.cpp: 9 (WebCore::WebGLRenderingContext::validateRenderingState): Minimum checking: if input <= 0, only check if each enabled vertex attribute is bound to a buffer. 10 (WebCore::WebGLRenderingContext::drawArrays): If underlying GL performs bounds checking, we still need to do the minimum checking using validateRenderingState. 11 (WebCore::WebGLRenderingContext::drawElements): Ditto. 12 * html/canvas/WebGLRenderingContext.h: Add a comment for input <= 0 in validateRenderingState. 13 1 14 2010-10-27 Simon Fraser <simon.fraser@apple.com> 2 15 -
trunk/WebCore/html/canvas/WebGLRenderingContext.cpp
r69804 r70661 879 879 } 880 880 881 if (numElementsRequired <= 0) 882 return true; 883 881 884 // Look in each consumed vertex attrib (by the current program) and find the smallest buffer size 882 885 long smallestNumElements = LONG_MAX; … … 940 943 return; 941 944 } 945 } else { 946 if (!validateRenderingState(0)) { 947 m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION); 948 return; 949 } 942 950 } 943 951 … … 990 998 return; 991 999 } 1000 } 1001 } else { 1002 if (!validateRenderingState(0)) { 1003 m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION); 1004 return; 992 1005 } 993 1006 } -
trunk/WebCore/html/canvas/WebGLRenderingContext.h
r69619 r70661 324 324 // Precise but slow index validation -- only done if conservative checks fail 325 325 bool validateIndexArrayPrecise(unsigned long count, unsigned long type, long offset, long& numElementsRequired); 326 // If numElements <= 0, we only check if each enabled vertex attribute is bound to a buffer. 326 327 bool validateRenderingState(long numElements); 327 328
Note: See TracChangeset
for help on using the changeset viewer.