mirror of
https://github.com/android/ndk-samples
synced 2025-11-11 02:45:37 +08:00
teapot project, chorographer-30fps: update comment to address code-review
This commit is contained in:
@@ -253,7 +253,7 @@ void Engine::choreographer_callback(long frameTimeNanos, void* data) {
|
|||||||
engine->StartChoreographer();
|
engine->StartChoreographer();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Swap buffer if the render cycle meet the condition.
|
// Swap buffer if the timing meets the 30fps time interval condition.
|
||||||
// The callback is in the same thread context, so that we can just invoke
|
// The callback is in the same thread context, so that we can just invoke
|
||||||
// eglSwapBuffers().
|
// eglSwapBuffers().
|
||||||
if (COULD_RENDER(frameTimeNanos, engine->prevFrameTimeNanos_)) {
|
if (COULD_RENDER(frameTimeNanos, engine->prevFrameTimeNanos_)) {
|
||||||
@@ -293,7 +293,7 @@ void Engine::StopJavaChoreographer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Engine::SynchInCallback(jlong frameTimeInNanos) {
|
void Engine::SynchInCallback(jlong frameTimeInNanos) {
|
||||||
// Signal render thread if the render cycle meet the condition.
|
// Signal render thread if the timing meets the 30fps time interval condition.
|
||||||
if (COULD_RENDER(frameTimeInNanos, prevFrameTimeNanos_)) {
|
if (COULD_RENDER(frameTimeInNanos, prevFrameTimeNanos_)) {
|
||||||
prevFrameTimeNanos_ = frameTimeInNanos;
|
prevFrameTimeNanos_ = frameTimeInNanos;
|
||||||
cv_.notify_one();
|
cv_.notify_one();
|
||||||
|
|||||||
Reference in New Issue
Block a user