Commit ac97fa75 authored by danakj@chromium.org's avatar danakj@chromium.org

cc: Stop checking the result of GetInverse in OcclusionTracker.

We don't draw layers with non-invertible transforms, so this check is
a waste. Especially in the case where we don't even use the inverse
transform.

R=enne

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

Cr-Commit-Position: refs/heads/master@{#291242}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291242 0039d316-1c4b-4281-b951-d872f2087c98
parent a73aae7d
...@@ -519,10 +519,6 @@ bool OcclusionTracker<LayerType>::Occluded( ...@@ -519,10 +519,6 @@ bool OcclusionTracker<LayerType>::Occluded(
return false; return false;
} }
gfx::Transform inverse_draw_transform(gfx::Transform::kSkipInitialization);
if (!draw_transform.GetInverse(&inverse_draw_transform))
return false;
// Take the ToEnclosingRect at each step, as we want to contain any unoccluded // Take the ToEnclosingRect at each step, as we want to contain any unoccluded
// partial pixels in the resulting Rect. // partial pixels in the resulting Rect.
Region unoccluded_region_in_target_surface = Region unoccluded_region_in_target_surface =
...@@ -555,8 +551,8 @@ gfx::Rect OcclusionTracker<LayerType>::UnoccludedContentRect( ...@@ -555,8 +551,8 @@ gfx::Rect OcclusionTracker<LayerType>::UnoccludedContentRect(
} }
gfx::Transform inverse_draw_transform(gfx::Transform::kSkipInitialization); gfx::Transform inverse_draw_transform(gfx::Transform::kSkipInitialization);
if (!draw_transform.GetInverse(&inverse_draw_transform)) bool ok = draw_transform.GetInverse(&inverse_draw_transform);
return content_rect; DCHECK(ok);
// Take the ToEnclosingRect at each step, as we want to contain any unoccluded // Take the ToEnclosingRect at each step, as we want to contain any unoccluded
// partial pixels in the resulting Rect. // partial pixels in the resulting Rect.
...@@ -600,8 +596,8 @@ gfx::Rect OcclusionTracker<LayerType>::UnoccludedContributingSurfaceContentRect( ...@@ -600,8 +596,8 @@ gfx::Rect OcclusionTracker<LayerType>::UnoccludedContributingSurfaceContentRect(
return content_rect; return content_rect;
gfx::Transform inverse_draw_transform(gfx::Transform::kSkipInitialization); gfx::Transform inverse_draw_transform(gfx::Transform::kSkipInitialization);
if (!draw_transform.GetInverse(&inverse_draw_transform)) bool ok = draw_transform.GetInverse(&inverse_draw_transform);
return content_rect; DCHECK(ok);
// Take the ToEnclosingRect at each step, as we want to contain any unoccluded // Take the ToEnclosingRect at each step, as we want to contain any unoccluded
// partial pixels in the resulting Rect. // partial pixels in the resulting Rect.
......
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