From 240f8a7532a024e36998bdbe87cff2ef080d75de Mon Sep 17 00:00:00 2001 From: Mitsuru Oshima Date: Wed, 22 Jul 2009 20:39:14 -0700 Subject: * a best effort fix for apps that uses get/set Matrix API on canvas. - scale the matrix - but don't scale if the matrix *looks* like obtained from the canvas itself. (typically to set it back to original matrix) This is best effort change and not perfect (not even close), but works for one game, and hopes it can handle many other apps that uses set/get Matrix. If you have an alternative idea, please let me know. --- core/java/android/view/ViewRoot.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/java/android/view/ViewRoot.java') diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java index 2f92b32e53f1..c6c3324d3783 100644 --- a/core/java/android/view/ViewRoot.java +++ b/core/java/android/view/ViewRoot.java @@ -392,7 +392,8 @@ public final class ViewRoot extends Handler implements ViewParent, mTranslator = compatibilityInfo.getTranslator(attrs); if (mTranslator != null || !compatibilityInfo.supportsScreen()) { - mSurface.setCompatibleDisplayMetrics(resources.getDisplayMetrics()); + mSurface.setCompatibleDisplayMetrics(resources.getDisplayMetrics(), + mTranslator); } boolean restore = false; -- cgit v1.2.3