cc: early return if unoccluded_region_in_target_surface is empty

R=danakj@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/381613004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282980 0039d316-1c4b-4281-b951-d872f2087c98
parent c7bd0547
......@@ -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(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment