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

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

Created:
5 years, 2 months ago by Nate Chapin
Modified:
5 years, 2 months ago
Reviewers:
esprehn
CC:
blink-reviews, blink-reviews-layout_chromium.org, eae+blinkwatch, gavinp+loader_chromium.org, Nate Chapin, jchaffraix+rendering, kinuko+watch, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, tyoshino+watch_chromium.org, Yoav Weiss, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
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 Committed: https://crrev.com/837d108907e02d5c267720fc41ecebf28ce36d2a Cr-Commit-Position: refs/heads/master@{#353188}

Patch Set 1 #

Patch Set 2 : #

Total comments: 11

Patch Set 3 : Rebase #

Patch Set 4 : Better names / cleanup #

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

Messages

Total messages: 9 (2 generated)
Nate Chapin
This is the reason for the cleanup in https://codereview.chromium.org/1362693004. esprehn, is this something you're comfortable ...
5 years, 2 months ago (2015-10-07 19:40:40 UTC) #2
esprehn
https://codereview.chromium.org/1378743002/diff/20001/third_party/WebKit/Source/core/fetch/Resource.cpp File third_party/WebKit/Source/core/fetch/Resource.cpp (right): https://codereview.chromium.org/1378743002/diff/20001/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode952 third_party/WebKit/Source/core/fetch/Resource.cpp:952: ResourceClientWalker<ResourceClient> w(m_clients); walker https://codereview.chromium.org/1378743002/diff/20001/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode953 third_party/WebKit/Source/core/fetch/Resource.cpp:953: while (ResourceClient* c = ...
5 years, 2 months ago (2015-10-08 05:39:11 UTC) #3
Nate Chapin
https://codereview.chromium.org/1378743002/diff/20001/third_party/WebKit/Source/core/fetch/Resource.cpp File third_party/WebKit/Source/core/fetch/Resource.cpp (right): https://codereview.chromium.org/1378743002/diff/20001/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode952 third_party/WebKit/Source/core/fetch/Resource.cpp:952: ResourceClientWalker<ResourceClient> w(m_clients); On 2015/10/08 05:39:11, esprehn wrote: > walker ...
5 years, 2 months ago (2015-10-08 21:26:38 UTC) #4
esprehn
lgtm
5 years, 2 months ago (2015-10-08 22:01:05 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1378743002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1378743002/60001
5 years, 2 months ago (2015-10-08 22:40:29 UTC) #7
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 2 months ago (2015-10-09 00:40:44 UTC) #8
commit-bot: I haz the power
5 years, 2 months ago (2015-10-09 00:41:34 UTC) #9
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/837d108907e02d5c267720fc41ecebf28ce36d2a
Cr-Commit-Position: refs/heads/master@{#353188}

Powered by Google App Engine
This is Rietveld 408576698