Bug 778799 - When offloading animations, use the device pixels to figure out scale instead of CSS pixels r=mattwoodrow
☠☠ backed out by a169ee0246ee ☠ ☠
authorDavid Zbarsky <dzbarsky@gmail.com>
Mon, 30 Jul 2012 11:25:25 -0700
changeset 100889 883bdf118b52331224bc8a3c0cc4540810331b31
parent 100888 3c34aa0c81f7541a12c64ab32132f7c26908239a
child 100890 a169ee0246ee170f4ef72a12d66951b0d5830882
push id12723
push userdzbarsky@gmail.com
push dateMon, 30 Jul 2012 18:25:29 +0000
treeherdermozilla-inbound@883bdf118b52 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs778799
milestone17.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 778799 - When offloading animations, use the device pixels to figure out scale instead of CSS pixels r=mattwoodrow
layout/base/nsDisplayList.cpp
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -271,17 +271,17 @@ static void
 AddAnimationsForProperty(nsIFrame* aFrame, nsCSSProperty aProperty,
                          ElementAnimation* ea, Layer* aLayer,
                          AnimationData& aData)
 {
   NS_ASSERTION(aLayer->AsContainerLayer(), "Should only animate ContainerLayer");
   nsStyleContext* styleContext = aFrame->GetStyleContext();
   nsPresContext* presContext = aFrame->PresContext();
   nsRect bounds = nsDisplayTransform::GetFrameBoundsForTransform(aFrame);
-  float scale = nsDeviceContext::AppUnitsPerCSSPixel();
+  float scale = presContext->AppUnitsPerDevPixel();
   float iterations = ea->mIterationCount != NS_IEEEPositiveInfinity()
                      ? ea->mIterationCount : -1;
   for (PRUint32 propIdx = 0; propIdx < ea->mProperties.Length(); propIdx++) {
     AnimationProperty* property = &ea->mProperties[propIdx];
     InfallibleTArray<AnimationSegment> segments;
 
     if (aProperty != property->mProperty) {
       continue;