Index: cc/trees/occlusion_tracker.cc |
diff --git a/cc/trees/occlusion_tracker.cc b/cc/trees/occlusion_tracker.cc |
index f4a414f6de29c35815f8abf9592974f0c56a6e1a..fb3b5acfe94c90fc145aa1f44279270e1f7a453f 100644 |
--- a/cc/trees/occlusion_tracker.cc |
+++ b/cc/trees/occlusion_tracker.cc |
@@ -567,6 +567,9 @@ gfx::Rect OcclusionTracker<LayerType>::UnoccludedContentRect( |
unoccluded_region_in_target_surface.Subtract( |
stack_.back().occlusion_from_outside_target); |
+ if (unoccluded_region_in_target_surface.IsEmpty()) |
+ return gfx::Rect(); |
+ |
gfx::Rect unoccluded_rect_in_target_surface = |
unoccluded_region_in_target_surface.bounds(); |
gfx::Rect unoccluded_rect = MathUtil::ProjectEnclosingClippedRect( |
@@ -609,6 +612,9 @@ gfx::Rect OcclusionTracker<LayerType>::UnoccludedContributingSurfaceContentRect( |
unoccluded_region_in_target_surface.Subtract( |
second_last.occlusion_from_outside_target); |
+ if (unoccluded_region_in_target_surface.IsEmpty()) |
+ return gfx::Rect(); |
+ |
gfx::Rect unoccluded_rect_in_target_surface = |
unoccluded_region_in_target_surface.bounds(); |
gfx::Rect unoccluded_rect = MathUtil::ProjectEnclosingClippedRect( |