Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Initiate image loads in the script thread #14781

Closed
wants to merge 8 commits into from

Commits on Jan 11, 2017

  1. Make script thread initiate requests for images needed by layout.

    In support of this goal, the layout thread collects information about
    CSS images that are missing image data and hands it off to the script
    thread after layout completes. The script thread stores a list of
    nodes that will need to be reflowed after the associated network
    request is complete. The script thread ensures that the nodes are
    not GCed while a request is ongoing, which the layout thread is
    incapable of guaranteeing.
    
    The image cache's API has also been redesigned in support of this
    work. No network requests are made by the new image cache, since it
    does not possess the document-specific information necessary to
    initiate them. Instead, there is now a single, synchronous
    query operation that optionally reserves a slot when a cache
    entry for a URL cannot be found. This reserved slot is then
    the responsibility of the queryer to populate with the contents
    of the network response for the URL once it is complete. Any
    subsequent queries for the same URL will be informed that the
    response is pending until that occurs.
    
    The changes to layout also remove the synchronous image loading
    code path, which means that reftests now test the same code
    that non-test binaries execute. The decision to take a screenshot
    now considers whether there are any outstanding image
    requests for layout in order to avoid intermittent failures in
    reftests that use CSS images.
    jdm committed Jan 11, 2017
  2. Remove synchronous forks of drawImage tests, and enable proper asynch…

    …ronous drawImage tests.
    jdm committed Jan 11, 2017
  3. Synchronously decode images if decoded bytes are requested after the …

    …full response is received.
    jdm committed Jan 11, 2017
  4. Split HTMLImageElement's loading code into smaller pieces with fewer …

    …runnables.
    jdm committed Jan 11, 2017
You can’t perform that action at this time.