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

Side by Side Diff: cc/page_scale_animation.cc

Issue 11233025: cc: Remove CC*.h temporary includes, part 4/4. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months 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
« no previous file with comments | « cc/overdraw_metrics.cc ('k') | cc/prioritized_texture.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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" 5 #include "config.h"
6 6
7 #include "CCPageScaleAnimation.h" 7 #include "cc/page_scale_animation.h"
8 8
9 #include "FloatRect.h" 9 #include "FloatRect.h"
10 #include "FloatSize.h" 10 #include "FloatSize.h"
11 11
12 #include <math.h> 12 #include <math.h>
13 13
14 namespace cc { 14 namespace cc {
15 15
16 scoped_ptr<CCPageScaleAnimation> CCPageScaleAnimation::create(const IntSize& scr ollStart, float pageScaleStart, const IntSize& windowSize, const IntSize& conten tSize, double startTime) 16 scoped_ptr<CCPageScaleAnimation> CCPageScaleAnimation::create(const IntSize& scr ollStart, float pageScaleStart, const IntSize& windowSize, const IntSize& conten tSize, double startTime)
17 { 17 {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // example, if we zoom from 0.5 to 4.0 in 3 seconds, then we should 149 // example, if we zoom from 0.5 to 4.0 in 3 seconds, then we should
150 // be zooming by 2x every second. 150 // be zooming by 2x every second.
151 float diff = m_pageScaleEnd / m_pageScaleStart; 151 float diff = m_pageScaleEnd / m_pageScaleStart;
152 float logDiff = log(diff); 152 float logDiff = log(diff);
153 logDiff *= ratio; 153 logDiff *= ratio;
154 diff = exp(logDiff); 154 diff = exp(logDiff);
155 return m_pageScaleStart * diff; 155 return m_pageScaleStart * diff;
156 } 156 }
157 157
158 } // namespace cc 158 } // namespace cc
OLDNEW
« no previous file with comments | « cc/overdraw_metrics.cc ('k') | cc/prioritized_texture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698