diff options
| author | Mitsuru Oshima <oshima@google.com> | 2009-07-22 20:39:14 -0700 |
|---|---|---|
| committer | Mitsuru Oshima <oshima@google.com> | 2009-07-23 13:31:00 -0700 |
| commit | 240f8a7532a024e36998bdbe87cff2ef080d75de (patch) | |
| tree | ffdc992eb95a2ccab062770fbf4ce320016e7435 /core/java/android/view/ViewRoot.java | |
| parent | de08cdc0a56ab8d48a226dadef02740520c274b7 (diff) | |
* 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.
Diffstat (limited to 'core/java/android/view/ViewRoot.java')
| -rw-r--r-- | core/java/android/view/ViewRoot.java | 3 |
1 files changed, 2 insertions, 1 deletions
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; |
