| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | |
| 6 | |
| 7 #include "cc/page_scale_animation.h" | 5 #include "cc/page_scale_animation.h" |
| 8 | 6 |
| 9 #include "cc/geometry.h" | 7 #include "cc/geometry.h" |
| 10 #include "ui/gfx/point_f.h" | 8 #include "ui/gfx/point_f.h" |
| 11 #include "ui/gfx/rect_f.h" | 9 #include "ui/gfx/rect_f.h" |
| 12 | 10 |
| 13 #include <math.h> | 11 #include <math.h> |
| 14 | 12 |
| 15 namespace { | 13 namespace { |
| 16 | 14 |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 | 202 |
| 205 // Linearly interpolate the magnitude in log scale. | 203 // Linearly interpolate the magnitude in log scale. |
| 206 float diff = m_targetPageScaleFactor / m_startPageScaleFactor; | 204 float diff = m_targetPageScaleFactor / m_startPageScaleFactor; |
| 207 float logDiff = log(diff); | 205 float logDiff = log(diff); |
| 208 logDiff *= interp; | 206 logDiff *= interp; |
| 209 diff = exp(logDiff); | 207 diff = exp(logDiff); |
| 210 return m_startPageScaleFactor * diff; | 208 return m_startPageScaleFactor * diff; |
| 211 } | 209 } |
| 212 | 210 |
| 213 } // namespace cc | 211 } // namespace cc |
| OLD | NEW |