mirror of
https://github.com/android/ndk-samples
synced 2025-11-08 17:16:11 +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();
|
||||
}
|
||||
|
||||
// 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
|
||||
// eglSwapBuffers().
|
||||
if (COULD_RENDER(frameTimeNanos, engine->prevFrameTimeNanos_)) {
|
||||
@@ -293,7 +293,7 @@ void Engine::StopJavaChoreographer() {
|
||||
}
|
||||
|
||||
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_)) {
|
||||
prevFrameTimeNanos_ = frameTimeInNanos;
|
||||
cv_.notify_one();
|
||||
|
||||
Reference in New Issue
Block a user