Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: cc/page_scale_animation.cc

Issue 11410021: Remove WTF and WebCore from cc/ and webkit/compositor_bindings/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "ui/gfx/point_f.h" 6 #include "ui/gfx/point_f.h"
9 #include "ui/gfx/rect_f.h" 7 #include "ui/gfx/rect_f.h"
10 8
11 #include <algorithm> 9 #include <algorithm>
12 #include <math.h> 10 #include <math.h>
13 11
14 namespace { 12 namespace {
15 13
16 gfx::PointF toPointF(const gfx::Vector2dF& vector) 14 gfx::PointF toPointF(const gfx::Vector2dF& vector)
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 205
208 // Linearly interpolate the magnitude in log scale. 206 // Linearly interpolate the magnitude in log scale.
209 float diff = m_targetPageScaleFactor / m_startPageScaleFactor; 207 float diff = m_targetPageScaleFactor / m_startPageScaleFactor;
210 float logDiff = log(diff); 208 float logDiff = log(diff);
211 logDiff *= interp; 209 logDiff *= interp;
212 diff = exp(logDiff); 210 diff = exp(logDiff);
213 return m_startPageScaleFactor * diff; 211 return m_startPageScaleFactor * diff;
214 } 212 }
215 213
216 } // namespace cc 214 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698