diff options
author | Mangesh Ghiware <mghiware@google.com> | 2012-05-07 13:58:13 -0700 |
---|---|---|
committer | Mangesh Ghiware <mghiware@google.com> | 2012-05-08 13:21:31 -0700 |
commit | 418e065ccd82593c3f5d49942b0aaee6fac95615 (patch) | |
tree | 6eaf682548a8c4976970bbd4bf4d90a7bc28e423 /Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp | |
parent | e19b4847176a5d05309947d1f57f57e5d63c7e61 (diff) | |
download | external_webkit-418e065ccd82593c3f5d49942b0aaee6fac95615.zip external_webkit-418e065ccd82593c3f5d49942b0aaee6fac95615.tar.gz external_webkit-418e065ccd82593c3f5d49942b0aaee6fac95615.tar.bz2 |
Fix visible area calculation.
Use the inverse of draw tranform to convert from content to layers
coordinate space.
Also, if the draw transform isn't limited to 2D space, return the entire
content area. Above conversion doesn't preserve 3D.
Bug: 6077575
Change-Id: I8393de0597ae5cd739b3df10c087cedd234ac9f0
Diffstat (limited to 'Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp b/Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp index 32f353c..19dc1f8 100644 --- a/Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp @@ -107,6 +107,14 @@ void GLUtils::setOrthographicMatrix(TransformationMatrix& ortho, float left, flo ortho.setM43(-(nearZ + farZ) / deltaZ); } +bool GLUtils::has3dTransform(const TransformationMatrix& matrix) +{ + return matrix.m13() != 0 || matrix.m23() != 0 + || matrix.m31() != 0 || matrix.m32() != 0 + || matrix.m33() != 1 || matrix.m34() != 0 + || matrix.m43() != 0; +} + ///////////////////////////////////////////////////////////////////////////////////////// // GL & EGL error checks ///////////////////////////////////////////////////////////////////////////////////////// |