|
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
|
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
|
|