summaryrefslogtreecommitdiffstats
path: root/ui/gfx
diff options
context:
space:
mode:
authorenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-25 08:32:23 +0000
committerenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-25 08:32:23 +0000
commitd81752b05cd9fcfdd11a519d832740e29c79e636 (patch)
treedccf05f1f1f1aec82638bb7cb0b814d07869ed9f /ui/gfx
parent5f7a1a10a071779928eb10af117c0dd18f96f6e7 (diff)
downloadchromium_src-d81752b05cd9fcfdd11a519d832740e29c79e636.zip
chromium_src-d81752b05cd9fcfdd11a519d832740e29c79e636.tar.gz
chromium_src-d81752b05cd9fcfdd11a519d832740e29c79e636.tar.bz2
cc: Make scroll compensation take integer snapping into account
Scroll layers are snapped to integer coordinates, but fixed position layers that compensated for that scroll weren't taking that into consideration. R=danakj@chromium.org BUG=309179 Review URL: https://codereview.chromium.org/41603002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230988 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx')
-rw-r--r--ui/gfx/transform.cc4
-rw-r--r--ui/gfx/transform.h3
2 files changed, 1 insertions, 6 deletions
diff --git a/ui/gfx/transform.cc b/ui/gfx/transform.cc
index e129af5..7fe5174 100644
--- a/ui/gfx/transform.cc
+++ b/ui/gfx/transform.cc
@@ -389,10 +389,6 @@ void Transform::FlattenTo2d() {
}
Vector2dF Transform::To2dTranslation() const {
- DCHECK(IsIdentityOrTranslation());
- // Ensure that this translation is truly 2d.
- const SkMScalar translate_z = matrix_.get(2, 3);
- DCHECK_EQ(0.f, translate_z);
return gfx::Vector2dF(SkMScalarToFloat(matrix_.get(0, 3)),
SkMScalarToFloat(matrix_.get(1, 3)));
}
diff --git a/ui/gfx/transform.h b/ui/gfx/transform.h
index 3621741..5e3b830 100644
--- a/ui/gfx/transform.h
+++ b/ui/gfx/transform.h
@@ -181,8 +181,7 @@ class GFX_EXPORT Transform {
//
void FlattenTo2d();
- // Returns the translation components of the matrix. It is an error to call
- // this function if the transform does not represent only a 2d translation.
+ // Returns the x and y translation components of the matrix.
Vector2dF To2dTranslation() const;
// Applies the transformation to the point.