Resumes ticking the application.
| 106 | |
| 107 | /// Resumes ticking the application. |
| 108 | void Resume() { |
| 109 | // This is called whenever the activity is resumed (brought into the |
| 110 | // foreground). When that happens, we schedule our next update tick with |
| 111 | // Choreographer. Choreographer is the Android system that paces app render |
| 112 | // loops. If you instead render new frames in a loop without frame pacing, |
| 113 | // you risk rendering more quickly than the display pipeline is able to |
| 114 | // present new frames. This will increase the latency between frame |
| 115 | // submission and presentation. |
| 116 | // https://developer.android.com/ndk/reference/group/choreographer |
| 117 | |
| 118 | // Checked to make sure we don't double schedule Choreographer. |
| 119 | if (!running_) { |
| 120 | running_ = true; |
| 121 | ScheduleNextTick(); |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | /// Pauses ticking the application. |
| 126 | /// |