Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(746)

Unified Diff: cc/layer_tree_host.cc

Issue 11644008: Migrate from MathUtil::inverse() to gfx::Transform::GetInverse() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch for landing Created 7 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layer_impl.cc ('k') | cc/layer_tree_host_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host.cc
diff --git a/cc/layer_tree_host.cc b/cc/layer_tree_host.cc
index 12ab72b4cfcdf649fc2f07e17828e546f3aa2134..6fab3f343771543645f84a1bd9cbda880584a8de 100644
--- a/cc/layer_tree_host.cc
+++ b/cc/layer_tree_host.cc
@@ -794,7 +794,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);
« no previous file with comments | « cc/layer_impl.cc ('k') | cc/layer_tree_host_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698