summaryrefslogtreecommitdiffstats
path: root/cc/layer_tree_host.cc
diff options
context:
space:
mode:
authorshawnsingh@google.com <shawnsingh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-07 18:46:17 +0000
committershawnsingh@google.com <shawnsingh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-07 18:46:17 +0000
commitbda419621f3a609ac9381f03344574b297d2a3fc (patch)
treeec426b89d2fd0db9841add54580ff4bfcc50802c /cc/layer_tree_host.cc
parent38eb497c29f6ba7ddf8b067f7b892bd7ed9e1423 (diff)
downloadchromium_src-bda419621f3a609ac9381f03344574b297d2a3fc.zip
chromium_src-bda419621f3a609ac9381f03344574b297d2a3fc.tar.gz
chromium_src-bda419621f3a609ac9381f03344574b297d2a3fc.tar.bz2
Migrate from MathUtil::inverse() to gfx::Transform::GetInverse()
BUG=159972, 163769 Review URL: https://codereview.chromium.org/11644008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175363 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layer_tree_host.cc')
-rw-r--r--cc/layer_tree_host.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/cc/layer_tree_host.cc b/cc/layer_tree_host.cc
index b85429e..390f001 100644
--- a/cc/layer_tree_host.cc
+++ b/cc/layer_tree_host.cc
@@ -780,7 +780,12 @@ gfx::PointF LayerTreeHost::adjustEventPointForPinchZoom(const gfx::PointF& zoome
// Scale to screen space before applying implTransform inverse.
gfx::PointF zoomedScreenspacePoint = gfx::ScalePoint(zoomedViewportPoint, deviceScaleFactor());
- gfx::Transform inverseImplTransform = MathUtil::inverse(m_implTransform);
+
+ gfx::Transform inverseImplTransform(gfx::Transform::kSkipInitialization);
+ if (!m_implTransform.GetInverse(&inverseImplTransform)) {
+ // TODO(shawnsingh): Either we need to handle uninvertible transforms
+ // here, or DCHECK that the transform is invertible.
+ }
bool wasClipped = false;
gfx::PointF unzoomedScreenspacePoint = MathUtil::projectPoint(inverseImplTransform, zoomedScreenspacePoint, wasClipped);