Title: [184073] trunk/Source/WebCore
Revision
184073
Author
[email protected]
Date
2015-05-11 03:41:24 -0700 (Mon, 11 May 2015)

Log Message

[WebGL] Unnecessary condition check in the while loop
https://bugs.webkit.org/show_bug.cgi?id=125001

Patch by Przemyslaw Szymanski <[email protected]> on 2015-05-11
Reviewed by Csaba Osztrogonác.

While loop in this case needs to be optimized a little.
For now a conditional statement in while will execute two
times at begin. do-while loop avoids to check first statement.

No new tests. No behaviour changed.

* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (184072 => 184073)


--- trunk/Source/WebCore/ChangeLog	2015-05-11 10:21:40 UTC (rev 184072)
+++ trunk/Source/WebCore/ChangeLog	2015-05-11 10:41:24 UTC (rev 184073)
@@ -1,3 +1,19 @@
+2015-05-11  Przemyslaw Szymanski  <[email protected]>
+
+        [WebGL] Unnecessary condition check in the while loop
+        https://bugs.webkit.org/show_bug.cgi?id=125001
+
+        Reviewed by Csaba Osztrogonác.
+
+        While loop in this case needs to be optimized a little.
+        For now a conditional statement in while will execute two
+        times at begin. do-while loop avoids to check first statement.
+
+        No new tests. No behaviour changed.
+
+        * html/canvas/WebGLFramebuffer.cpp:
+        (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
+
 2015-05-11  Joonghun Park  <[email protected]>
 
         [GTK] Reorder Performance class's member initialization sequence

Modified: trunk/Source/WebCore/html/canvas/WebGLFramebuffer.cpp (184072 => 184073)


--- trunk/Source/WebCore/html/canvas/WebGLFramebuffer.cpp	2015-05-11 10:21:40 UTC (rev 184072)
+++ trunk/Source/WebCore/html/canvas/WebGLFramebuffer.cpp	2015-05-11 10:41:24 UTC (rev 184073)
@@ -369,7 +369,7 @@
         return;
 
     bool checkMore = true;
-    while (checkMore) {
+    do {
         checkMore = false;
         for (AttachmentMap::iterator it = m_attachments.begin(); it != m_attachments.end(); ++it) {
             WebGLAttachment* attachmentObject = it->value.get();
@@ -381,7 +381,7 @@
                 break;
             }
         }
-    }
+    } while (checkMore);
 }
 
 GC3Dsizei WebGLFramebuffer::getColorBufferWidth() const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to