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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 571653003: cc: Make GetViewportForTilePriorityInContentSpace() not need intersect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 1205e076a0f4b072cd31ad4e489fffad8e2294c3..9dfb054aa21817d65409230484390c87c0bcdbc0 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -486,7 +486,6 @@ void PictureLayerImpl::UpdateTilePriorities(
gfx::Rect visible_rect_in_content_space(
GetViewportForTilePriorityInContentSpace());
- visible_rect_in_content_space.Intersect(visible_content_rect());
gfx::Rect visible_layer_rect = gfx::ScaleToEnclosingRect(
visible_rect_in_content_space, 1.f / contents_scale_x());
WhichTree tree =
@@ -524,6 +523,7 @@ gfx::Rect PictureLayerImpl::GetViewportForTilePriorityInContentSpace() const {
}
}
+ visible_rect_in_content_space.Intersect(visible_content_rect());
return visible_rect_in_content_space;
}
@@ -789,13 +789,11 @@ void PictureLayerImpl::MarkVisibleResourcesAsRequired() const {
if (visible_content_rect().IsEmpty())
return;
- gfx::Rect rect(visible_content_rect());
-
// Only mark tiles inside the viewport for tile priority as required for
// activation. This viewport is normally the same as the draw viewport but
// can be independently overridden by embedders like Android WebView with
// SetExternalDrawConstraints.
- rect.Intersect(GetViewportForTilePriorityInContentSpace());
+ gfx::Rect rect = GetViewportForTilePriorityInContentSpace();
float min_acceptable_scale =
std::min(raster_contents_scale_, ideal_contents_scale_);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698