Title: [153742] trunk/Source/WebCore
Revision
153742
Author
commit-qu...@webkit.org
Date
2013-08-05 23:45:44 -0700 (Mon, 05 Aug 2013)

Log Message

[WebGL] validateRenderingState method name change
https://bugs.webkit.org/show_bug.cgi?id=119485

According to validateRenderingState method functionality its name should be
changed. This method validates only vertex attributes.

Patch by Przemyslaw Szymanski <p.szymans...@samsung.com> on 2013-08-05
Reviewed by Dean Jackson.

No new tests. Covered by existing tests. No changes in functionality.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateVertexAttributes):
(WebCore::WebGLRenderingContext::drawArrays):
(WebCore::WebGLRenderingContext::drawElements):
* html/canvas/WebGLRenderingContext.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (153741 => 153742)


--- trunk/Source/WebCore/ChangeLog	2013-08-06 06:21:50 UTC (rev 153741)
+++ trunk/Source/WebCore/ChangeLog	2013-08-06 06:45:44 UTC (rev 153742)
@@ -1,3 +1,21 @@
+2013-08-05  Przemyslaw Szymanski  <p.szymans...@samsung.com>
+
+        [WebGL] validateRenderingState method name change
+        https://bugs.webkit.org/show_bug.cgi?id=119485
+
+        According to validateRenderingState method functionality its name should be
+        changed. This method validates only vertex attributes.
+
+        Reviewed by Dean Jackson.
+
+        No new tests. Covered by existing tests. No changes in functionality.
+
+        * html/canvas/WebGLRenderingContext.cpp:
+        (WebCore::WebGLRenderingContext::validateVertexAttributes):
+        (WebCore::WebGLRenderingContext::drawArrays):
+        (WebCore::WebGLRenderingContext::drawElements):
+        * html/canvas/WebGLRenderingContext.h:
+
 2013-07-27  Mark Rowe  <mr...@apple.com>
 
         Logging should be configurable using human-readable channel names rather than crazy bitmasks

Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (153741 => 153742)


--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp	2013-08-06 06:21:50 UTC (rev 153741)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp	2013-08-06 06:45:44 UTC (rev 153742)
@@ -1874,7 +1874,7 @@
     return numElementsRequired > 0;
 }
 
-bool WebGLRenderingContext::validateRenderingState(unsigned numElementsRequired)
+bool WebGLRenderingContext::validateVertexAttributes(unsigned numElementsRequired)
 {
     if (!m_currentProgram)
         return false;
@@ -1956,12 +1956,12 @@
         Checked<GC3Dint, RecordOverflow> checkedFirst(first);
         Checked<GC3Dint, RecordOverflow> checkedCount(count);
         Checked<GC3Dint, RecordOverflow> checkedSum = checkedFirst + checkedCount;
-        if (checkedSum.hasOverflowed() || !validateRenderingState(checkedSum.unsafeGet())) {
+        if (checkedSum.hasOverflowed() || !validateVertexAttributes(checkedSum.unsafeGet())) {
             synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "drawArrays", "attempt to access out of bounds arrays");
             return;
         }
     } else {
-        if (!validateRenderingState(0)) {
+        if (!validateVertexAttributes(0)) {
             synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "drawArrays", "attribs not setup correctly");
             return;
         }
@@ -2036,14 +2036,14 @@
         }
         if (!count)
             return;
-        if (!validateIndexArrayConservative(type, numElements) || !validateRenderingState(numElements)) {
-            if (!validateIndexArrayPrecise(count, type, static_cast<GC3Dintptr>(offset), numElements) || !validateRenderingState(numElements)) {
+        if (!validateIndexArrayConservative(type, numElements) || !validateVertexAttributes(numElements)) {
+            if (!validateIndexArrayPrecise(count, type, static_cast<GC3Dintptr>(offset), numElements) || !validateVertexAttributes(numElements)) {
                 synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "drawElements", "attempt to access out of bounds arrays");
                 return;
             }
         }
     } else {
-        if (!validateRenderingState(0)) {
+        if (!validateVertexAttributes(0)) {
             synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "drawElements", "attribs not setup correctly");
             return;
         }

Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h (153741 => 153742)


--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h	2013-08-06 06:21:50 UTC (rev 153741)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h	2013-08-06 06:45:44 UTC (rev 153742)
@@ -377,7 +377,7 @@
     // Precise but slow index validation -- only done if conservative checks fail
     bool validateIndexArrayPrecise(GC3Dsizei count, GC3Denum type, GC3Dintptr offset, unsigned& numElementsRequired);
     // If numElements <= 0, we only check if each enabled vertex attribute is bound to a buffer.
-    bool validateRenderingState(unsigned numElements);
+    bool validateVertexAttributes(unsigned numElements);
 
     bool validateWebGLObject(const char*, WebGLObject*);
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to