summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authoralokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-07 12:00:16 +0000
committeralokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-07 12:00:16 +0000
commit3509df20da907cd6bccbcd74d39467e6b3378161 (patch)
tree12321403b90e8301ef7fb45b0b64d2082db1ad95 /cc
parent9d7dc97f787a785965ee81d486fb23f984a020c3 (diff)
downloadchromium_src-3509df20da907cd6bccbcd74d39467e6b3378161.zip
chromium_src-3509df20da907cd6bccbcd74d39467e6b3378161.tar.gz
chromium_src-3509df20da907cd6bccbcd74d39467e6b3378161.tar.bz2
cc: Remove duplicate computation of subtree content-rect.
Review URL: https://codereview.chromium.org/63373002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233588 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/trees/layer_tree_host_common.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index 0f31038..19373c4 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -1988,19 +1988,16 @@ static void CalculateDrawPropertiesInternal(
return;
}
- if (layer->DrawsContent()) {
- gfx::Rect local_drawable_content_rect = rect_in_target_space;
- if (layer_or_ancestor_clips_descendants)
- local_drawable_content_rect.Intersect(clip_rect_in_target_space);
- local_drawable_content_rect_of_subtree.Union(local_drawable_content_rect);
- }
-
// Compute the layer's drawable content rect (the rect is in target surface
// space).
layer_draw_properties.drawable_content_rect = rect_in_target_space;
if (layer_or_ancestor_clips_descendants) {
- layer_draw_properties.drawable_content_rect.
- Intersect(clip_rect_in_target_space);
+ layer_draw_properties.drawable_content_rect.Intersect(
+ clip_rect_in_target_space);
+ }
+ if (layer->DrawsContent()) {
+ local_drawable_content_rect_of_subtree.Union(
+ layer_draw_properties.drawable_content_rect);
}
// Compute the layer's visible content rect (the rect is in content space).