Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 } | 46 } |
| 47 | 47 |
| 48 WebActiveGestureAnimation::WebActiveGestureAnimation(PassOwnPtr<WebGestureCurve> curve, WebGestureCurveTarget* target, double startTime, bool waitingForFirstTic k) | 48 WebActiveGestureAnimation::WebActiveGestureAnimation(PassOwnPtr<WebGestureCurve> curve, WebGestureCurveTarget* target, double startTime, bool waitingForFirstTic k) |
| 49 : m_startTime(startTime) | 49 : m_startTime(startTime) |
| 50 , m_waitingForFirstTick(waitingForFirstTick) | 50 , m_waitingForFirstTick(waitingForFirstTick) |
| 51 , m_curve(curve) | 51 , m_curve(curve) |
| 52 , m_target(target) | 52 , m_target(target) |
| 53 { | 53 { |
| 54 } | 54 } |
| 55 | 55 |
| 56 bool WebActiveGestureAnimation::animate(double time) | 56 bool WebActiveGestureAnimation::animate(WebFrameTime frameTime) |
| 57 { | 57 { |
| 58 double time = frameTime.displayFrameTime; | |
| 58 if (m_waitingForFirstTick) { | 59 if (m_waitingForFirstTick) { |
| 59 m_startTime = time; | 60 m_startTime = time; |
| 60 m_waitingForFirstTick = false; | 61 m_waitingForFirstTick = false; |
| 61 } | 62 } |
| 62 // All WebGestureCurves assume zero-based time, so we subtract | 63 // All WebGestureCurves assume zero-based time, so we subtract |
| 63 // the animation start time before passing to the curve. | 64 // the animation start time before passing to the curve. |
| 64 return m_curve->apply(time - m_startTime, m_target); | 65 return m_curve->apply(time - m_startTime, m_target); |
|
picksi
2014/06/24 10:10:26
As per previous comment this would become:
return
mithro-old
2014/07/01 06:04:42
See previous comment.
| |
| 65 } | 66 } |
| 66 | 67 |
| 67 } // namespace blink | 68 } // namespace blink |
| OLD | NEW |