⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 184073 in webkit


Ignore:
Timestamp:
May 11, 2015, 3:41:24 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Przemyslaw Szymanski <p.szymanski3@samsung.com> 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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r184071 r184073  
     12015-05-11  Przemyslaw Szymanski  <p.szymanski3@samsung.com>
     2
     3        [WebGL] Unnecessary condition check in the while loop
     4        https://bugs.webkit.org/show_bug.cgi?id=125001
     5
     6        Reviewed by Csaba Osztrogonác.
     7
     8        While loop in this case needs to be optimized a little.
     9        For now a conditional statement in while will execute two
     10        times at begin. do-while loop avoids to check first statement.
     11
     12        No new tests. No behaviour changed.
     13
     14        * html/canvas/WebGLFramebuffer.cpp:
     15        (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
     16
    1172015-05-11  Joonghun Park  <jh718.park@samsung.com>
    218
  • trunk/Source/WebCore/html/canvas/WebGLFramebuffer.cpp

    r183726 r184073  
    370370
    371371    bool checkMore = true;
    372     while (checkMore) {
     372    do {
    373373        checkMore = false;
    374374        for (AttachmentMap::iterator it = m_attachments.begin(); it != m_attachments.end(); ++it) {
     
    382382            }
    383383        }
    384     }
     384    } while (checkMore);
    385385}
    386386
Note: See TracChangeset for help on using the changeset viewer.