Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(531)

Unified Diff: runtime/embedders/openglui/android/eventloop.cc

Issue 12186002: Canvas API. There are still a number of things to do: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/embedders/openglui/android/eventloop.cc
===================================================================
--- runtime/embedders/openglui/android/eventloop.cc (revision 17737)
+++ runtime/embedders/openglui/android/eventloop.cc (working copy)
@@ -27,9 +27,11 @@
input_handler_ = input_handler;
LOGI("Starting event loop");
while (true) {
- // If not enabled, block on events. If enabled, don't block
- // so we can do useful work in onStep.
- while ((result = ALooper_pollAll(enabled_ ? 0 : -1,
+ // If not enabled, block indefinitely on events. If enabled, block
+ // briefly so we can do useful work in onStep. Ultimately this is
+ // where we would want to look at elapsed time since the last call
+ // to onStep completed and use a delay that gives us ~60fps.
+ while ((result = ALooper_pollAll(enabled_ ? (1000/60) : -1,
NULL,
&events,
reinterpret_cast<void**>(&source))) >= 0) {
« no previous file with comments | « runtime/embedders/openglui/android/android_graphics_handler.cc ('k') | runtime/embedders/openglui/build_skia.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698