Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Issue 1304063016: Refactor the API for setting dynamic resource load priorities (Closed)

Created:
5 years, 3 months ago by Nate Chapin
Modified:
5 years, 2 months ago
Reviewers:
CC:
blink-reviews, Yoav Weiss, szager+layoutwatch_chromium.org, zoltan1, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, tyoshino+watch_chromium.org, leviw+renderwatch, gavinp+loader_chromium.org, jchaffraix+rendering, kinuko+watch, Nate Chapin
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Refactor the API for setting dynamic resource load priorities Currently, only images can change priority after blink sends the resource load out to chromium. After each layout, we iterate through a registry of LayoutObjects with associated images and update those images' priority based on whether the LayoutObject is in the viewport and how much of the viewport it fills. Change this API to be more general, so that it could more easily support other resource types and other factors for updating priority. Move the current logic to ResourceFetcher, which has a list of all in-progress resource loads. For each, ask the associated ResourceClients for updated priority information. This should not entail any behavior change at this time. BUG=536147

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+137 lines, -387 lines) Patch
M Source/core/core.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/fetch/FetchContext.h View 1 chunk +1 line, -2 lines 0 comments Download
M Source/core/fetch/Resource.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/fetch/Resource.cpp View 1 chunk +14 lines, -0 lines 0 comments Download
M Source/core/fetch/ResourceClient.h View 2 chunks +3 lines, -0 lines 0 comments Download
M Source/core/fetch/ResourceFetcher.h View 3 chunks +3 lines, -2 lines 0 comments Download
M Source/core/fetch/ResourceFetcher.cpp View 5 chunks +26 lines, -9 lines 0 comments Download
D Source/core/fetch/ResourceLoadPriorityOptimizer.h View 1 chunk +0 lines, -82 lines 0 comments Download
D Source/core/fetch/ResourceLoadPriorityOptimizer.cpp View 1 chunk +0 lines, -132 lines 0 comments Download
M Source/core/fetch/ResourceLoader.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/fetch/ResourceLoader.cpp View 1 chunk +2 lines, -9 lines 0 comments Download
M Source/core/fetch/ResourceLoaderSet.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/frame/FrameView.cpp View 3 chunks +3 lines, -5 lines 0 comments Download
M Source/core/layout/LayoutBlock.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/layout/LayoutBlock.cpp View 4 chunks +0 lines, -75 lines 0 comments Download
M Source/core/layout/LayoutBox.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/layout/LayoutBox.cpp View 1 chunk +25 lines, -0 lines 0 comments Download
M Source/core/layout/LayoutImage.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/layout/LayoutImage.cpp View 3 chunks +0 lines, -32 lines 0 comments Download
M Source/core/layout/LayoutObject.cpp View 2 chunks +0 lines, -2 lines 0 comments Download
M Source/core/loader/FrameFetchContext.h View 1 chunk +1 line, -2 lines 0 comments Download
M Source/core/loader/FrameFetchContext.cpp View 3 chunks +10 lines, -8 lines 0 comments Download
M Source/core/loader/FrameFetchContextTest.cpp View 2 chunks +28 lines, -22 lines 0 comments Download
M Source/platform/network/ResourceLoadPriority.h View 1 chunk +18 lines, -0 lines 0 comments Download

Powered by Google App Engine
This is Rietveld 408576698