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

Unified Diff: cc/layer_impl.cc

Issue 11644008: Migrate from MathUtil::inverse() to gfx::Transform::GetInverse() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
Index: cc/layer_impl.cc
diff --git a/cc/layer_impl.cc b/cc/layer_impl.cc
index e1cf9d49fd8695871fa11f6bc3ce5511864c715a..59ad8d8d83c43eaf9c09f749cc4e2de867709a5f 100644
--- a/cc/layer_impl.cc
+++ b/cc/layer_impl.cc
@@ -236,7 +236,9 @@ InputHandlerClient::ScrollStatus LayerImpl::tryScroll(const gfx::PointF& screenS
if (!nonFastScrollableRegion().IsEmpty()) {
bool clipped = false;
- gfx::PointF hitTestPointInContentSpace = MathUtil::projectPoint(MathUtil::inverse(screenSpaceTransform()), screenSpacePoint, clipped);
+ gfx::Transform inverseScreenSpaceTransform(gfx::Transform::kSkipInitialization);
+ screenSpaceTransform().GetInverse(&inverseScreenSpaceTransform);
danakj 2012/12/19 05:23:06 If GetInverse() returns false, seems like we shoul
+ gfx::PointF hitTestPointInContentSpace = MathUtil::projectPoint(inverseScreenSpaceTransform, screenSpacePoint, clipped);
gfx::PointF hitTestPointInLayerSpace = gfx::ScalePoint(hitTestPointInContentSpace, 1 / contentsScaleX(), 1 / contentsScaleY());
if (!clipped && nonFastScrollableRegion().Contains(gfx::ToRoundedPoint(hitTestPointInLayerSpace))) {
TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed nonFastScrollableRegion");

Powered by Google App Engine
This is Rietveld 408576698