Bug 64365 - TiledDrawingArea: Handle update requests in the order they were received.
Summary: TiledDrawingArea: Handle update requests in the order they were received.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jocelyn Turcotte
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-12 09:22 PDT by Jocelyn Turcotte
Modified: 2011-08-02 10:01 PDT (History)
1 user (show)

See Also:


Attachments
Patch (4.72 KB, patch)
2011-07-12 09:25 PDT, Jocelyn Turcotte
no flags Details | Formatted Diff | Diff
Patch (4.70 KB, patch)
2011-07-29 08:53 PDT, Jocelyn Turcotte
kling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jocelyn Turcotte 2011-07-12 09:22:59 PDT
TiledDrawingArea: Handle update requests in the order they were received.
Comment 1 Jocelyn Turcotte 2011-07-12 09:25:29 PDT
Created attachment 100497 [details]
Patch
Comment 2 Andreas Kling 2011-07-26 11:09:19 PDT
Comment on attachment 100497 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=100497&action=review

Looks good, but let's clean it up a bit.

> Source/WebKit2/WebProcess/WebPage/TiledDrawingArea.cpp:181
> +    for (UpdateList::iterator it = m_pendingUpdates.begin(); it != m_pendingUpdates.end(); ++it) {

Keep the end() iterator in a separate variable for micro-optimization goodness.

> Source/WebKit2/WebProcess/WebPage/TiledDrawingArea.cpp:196
> +    for (UpdateList::iterator it = m_pendingUpdates.begin(); it != m_pendingUpdates.end(); ++it) {

Ditto.

> Source/WebKit2/WebProcess/WebPage/TiledDrawingArea.cpp:200
> +            found = true;
> +            break;

Simply return; here, and you won't even need the "found" variable.
Comment 3 Jocelyn Turcotte 2011-07-29 08:53:57 PDT
Created attachment 102369 [details]
Patch

Suggestions proudly fulfilled.
Comment 4 Andreas Kling 2011-08-01 00:14:41 PDT
Comment on attachment 102369 [details]
Patch

r=me!
Comment 5 Jocelyn Turcotte 2011-08-02 10:01:37 PDT
Committed r92198: <http://trac.webkit.org/changeset/92198>