Merge \\"Avoid re-calculating vsync mid-frame\\" into nyc-dev am: fc275d244e

am: cb0649f72b

Change-Id: I7cc9443c1ab3e876daa3aeecbcb9a41085f359af
This commit is contained in:
John Reck
2016-06-18 02:08:56 +00:00
committed by android-build-merger
3 changed files with 1 additions and 6 deletions

View File

@@ -63,7 +63,7 @@ void AnimationContext::startFrame(TreeInfo::TraversalMode mode) {
mCurrentFrameAnimations.mNextHandle = head; mCurrentFrameAnimations.mNextHandle = head;
head->mPreviousHandle = &mCurrentFrameAnimations; head->mPreviousHandle = &mCurrentFrameAnimations;
} }
mFrameTimeMs = mClock.computeFrameTimeMs(); mFrameTimeMs = ns2ms(mClock.latestVsync());
} }
void AnimationContext::runRemainingAnimations(TreeInfo& info) { void AnimationContext::runRemainingAnimations(TreeInfo& info) {

View File

@@ -43,10 +43,6 @@ nsecs_t TimeLord::computeFrameTimeNanos() {
return mFrameTimeNanos; return mFrameTimeNanos;
} }
nsecs_t TimeLord::computeFrameTimeMs() {
return nanoseconds_to_milliseconds(computeFrameTimeNanos());
}
} /* namespace renderthread */ } /* namespace renderthread */
} /* namespace uirenderer */ } /* namespace uirenderer */
} /* namespace android */ } /* namespace android */

View File

@@ -34,7 +34,6 @@ public:
// returns true if the vsync is newer, false if it was rejected for staleness // returns true if the vsync is newer, false if it was rejected for staleness
bool vsyncReceived(nsecs_t vsync); bool vsyncReceived(nsecs_t vsync);
nsecs_t latestVsync() { return mFrameTimeNanos; } nsecs_t latestVsync() { return mFrameTimeNanos; }
nsecs_t computeFrameTimeMs();
nsecs_t computeFrameTimeNanos(); nsecs_t computeFrameTimeNanos();
private: private: