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

Unified Diff: Source/core/rendering/RenderBlock.cpp

Issue 153983004: Schedule image resource downloads by decreasing visual impact - Blink Side (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase + variable name change. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/loader/FrameLoaderClient.h ('k') | Source/core/rendering/RenderImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlock.cpp
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
index a23bfbb8af6da719c0329019d101c1b0f6ab86d1..4a6ff5b646b2d4b058e92e985f7802e8336a3dc5 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -1320,8 +1320,14 @@ bool RenderBlock::updateImageLoadingPriorities()
ResourceLoadPriorityOptimizer::VisibilityStatus status = isVisible ?
ResourceLoadPriorityOptimizer::Visible : ResourceLoadPriorityOptimizer::NotVisible;
+ LayoutRect screenArea;
+ if (!objectBounds.isEmpty()) {
+ screenArea = viewBounds;
+ screenArea.intersect(objectBounds);
+ }
+
for (Vector<ImageResource*>::iterator it = images.begin(), end = images.end(); it != end; ++it)
- ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->notifyImageResourceVisibility(*it, status);
+ ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->notifyImageResourceVisibility(*it, status, screenArea);
return true;
}
« no previous file with comments | « Source/core/loader/FrameLoaderClient.h ('k') | Source/core/rendering/RenderImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698